Related Articles

Related Articles

Wand path_move() function in Python
  • Last Updated : 10 May, 2020

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)


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')
    # set starting point for first sub-path
    draw.path_move(to =(10, 10))
    # Drawing vertical line from start
                            relative = True)
    # set starting point for second sub-path
    draw.path_move(to =(190, 10))
    # Drawing vertical line from start
                            relative = True)
    with Image(width = 200, height = 200, background = Color('lightgreen')) as image:
        draw(image) ="pathmove.png")


Output :

Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.

To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :