Friday, November 21, 2025
HomeLanguagesWand path_start() function in Python

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 graphics in a path.
In this article we will learn path_start() function. path is initiated using path_start function.

Syntax: wand.drawing.path_start()

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.path_start()
      
    # Start middle-left
    draw.path_move(to =(100, 100))
    draw.path_horizontal_line(1)
      
    # Close first & last points
    draw.path_close()
    draw.path_finish()
    with Image(width = 200, 
               height = 200,
               background = Color('green')) as image:
          
        draw(image)
        image.save(filename = "pathstart.png")


Output:

Example #2:




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.path_start()
      
    # Start middle-left
    draw.path_move(to=(100, 100))
      
    # draw a vertical line from path initial point
    draw.path_vertical_line(1)
      
    # Close first & last points
    draw.path_close()
    draw.path_finish()
    with Image(width=200,
               height=200,
               background=Color('green')) as image:
        draw(image)
        image.save(filename = "pathstart.png")


Output:

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

Most Popular

Dominic
32405 POSTS0 COMMENTS
Milvus
97 POSTS0 COMMENTS
Nango Kala
6781 POSTS0 COMMENTS
Nicole Veronica
11928 POSTS0 COMMENTS
Nokonwaba Nkukhwana
11995 POSTS0 COMMENTS
Shaida Kate Naidoo
6907 POSTS0 COMMENTS
Ted Musemwa
7166 POSTS0 COMMENTS
Thapelo Manthata
6862 POSTS0 COMMENTS
Umr Jansen
6847 POSTS0 COMMENTS