Friday, September 26, 2025
HomeLanguagesWand path_move() function in Python

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 Type Description
to sequence or (numbers.Real, numbers.Real) pair which represents coordinates to drawn to.
relative bool treat given coordinates as relative to current point.

Example #1:




from wand.image import Image
from wand.drawing import Drawing
from wand.color import Color
  
with Drawing() as draw:
    draw.stroke_width = 2
    draw.stroke_color = Color('black')
    draw.fill_color = Color('white')
    draw.path_start()
    # set starting point for first sub-path
    draw.path_move(to =(10, 10))
    # Drawing vertical line from start
    draw.path_vertical_line(100,
                            relative = True)
    # set starting point for second sub-path
    draw.path_move(to =(190, 10))
    # Drawing vertical line from start
    draw.path_vertical_line(100,
                            relative = True)
    draw.path_finish()
    with Image(width = 200, height = 200, background = Color('lightgreen')) as image:
        draw(image)
        image.save(filename ="pathmove.png")


Output :

Last Updated :
10 May, 2020
Like Article
Save Article

<!–

–>

Similar Reads
Related Tutorials
Dominic
Dominichttp://wardslaus.com
infosec,malicious & dos attacks generator, boot rom exploit philanthropist , wild hacker , game developer,
RELATED ARTICLES

Most Popular

Dominic
32320 POSTS0 COMMENTS
Milvus
84 POSTS0 COMMENTS
Nango Kala
6683 POSTS0 COMMENTS
Nicole Veronica
11854 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11910 POSTS0 COMMENTS
Shaida Kate Naidoo
6795 POSTS0 COMMENTS
Ted Musemwa
7071 POSTS0 COMMENTS
Thapelo Manthata
6755 POSTS0 COMMENTS
Umr Jansen
6762 POSTS0 COMMENTS