Wand point() function in Python (original) (raw)
Last Updated : 01 Jun, 2021
point() is another drawing function and simplest of all. point() function basically draw a point on a particular point on an image. It simply takes two x, y arguments for the point coordinate.
Syntax :
wand.drawing.point(x, y)
Parameters:
Parameter Input Type Description x numbers.Real x coordinate of point y numbers.Real y coordinate of point
Example #1:
Python3
from
wand.image
import
Image
from
wand.drawing
import
Drawing
from
wand.color
import
Color
with Drawing() as draw:
`` x
=
100
`` y
=
100
`` draw.point(x, y)
`` with Image(width
=
200
, height
=
200
,
`` background
=
Color(
'lightgreen'
)) as image:
`` draw(image)
`` image.save(filename
=
"point.png"
)
Output:
Example #2:
Python3
from
wand.image
import
Image
from
wand.drawing
import
Drawing
from
wand.color
import
Color
import
math
with Drawing() as draw:
`` for
x
in
xrange
(
0
,
200
):
`` y
=
math.tan(x)
*
4
`` draw.point(x, y
+
50
)
`` with Image(width
=
200
, height
=
200
, background
=
Color(
'lightgreen'
)) as image:
`` draw(image)
`` image.save(filename
=
"points.png"
)
Output:
Similar Reads
- Wand polyline() function in Python polyline() is another drawing function present in wand.drawing module of Wand. polyline() is similar to polygon() function the only difference is that, it will not close the stroke line b/w first and last point. Similar to polygon() it also takes a list of point tuples as an argument. Syntax : wand. 1 min read
- Wand line() function in Python line() is another drawing function present in wand.drawing module. As the name implies line() function is used to draw a line in the image. line() function only need two arguments that are start and end point of the line that we want to draw. Syntax : wand.drawing.line(start, end) Parameters : Param 2 min read
- Wand polygon() function in Python polygon() function is another drawing function introduced in wand.drawing module. We can draw complex shapes using polygon() function. It takes a list of points in polygons as argument. Stroke line will automatically close between first & last point. Syntax : wand.drawing.polygon(points) Paramet 1 min read
- Wand noise() function - Python The noise() function is an inbuilt function in the Python Wand ImageMagick library which is used to add noise to the image. Syntax: noise(noise_type, attenuate, channel) Parameters: This function accepts three parameters as mentioned above and defined below: noise_type: This parameter is used to sto 2 min read
- Wand path_line() function in Python path_line() is a function specially introduced for paths. path_line() draws a line from a destination point to the point we want the line we end to. It takes only end point as argument. Syntax : wand.drawing.path_line(to, relative) Parameters: ParameterInput TypeDescriptiontosequence or (numbers.Rea 1 min read
- Python - Image() function in Wand In this specific article we will learn how to read our image through Python wand module. To read image in Wand we use Image() function. To manipulate an image first of all we need to read image in Python. Parameters : Parameter Input Type Description image Image make exact copy of image blob bytes o 2 min read
- Wand function() function in Python function() function is similar to evaluate function. In function() function pixel channels can be manipulated by applies a multi-argument function to pixel channels. Following are the list of FUNCTION_TYPES in Wand: 'undefined''arcsin''arctan''polynomial''sinusoid' Syntax : wand.image.function(funct 1 min read
- Wand path_move() function in Python path_move() is another function introduced in wand for paths. The main aim of path_move() function is to set new starting point for a new sub_path. Given to parameter can be relative, or absolute, by setting the relative flag. Syntax : wand.drawing.path_move(to, relative) Parameters: Parameter Input 1 min read
- Wand path_start() function in Python We can also draw paths in wand.drawing module. Each path method expects a destination point, and will draw from the current point to the new point. The destination point will become the new current point for the next applied path method. Paths in wand consist of some other methods to draw different 1 min read
- Wand path_curve() function in Python path_curve() is a function specially introduced for paths. path_curve() draws a cubic bezier curve from the destination point of the Image to a particular point (x, y) with the help of control points. Syntax : wand.drawing.path_curve(to, controls, smooth, relative) Parameters: ParameterInput TypeDes 1 min read