devankestel / hilldown

Hilldown
0 stars 0 forks source link

Create a method in HilldownDraw class to draw a path segment. #2

Closed devankestel closed 3 years ago

devankestel commented 3 years ago

Using the drawSVG library create an instance method which draws a path segment. Here is an example path using the library:

Draw an arbitrary path (a triangle in this case)

      p = draw.Path(stroke_width=2, stroke='green',
                    fill='black', fill_opacity=0.5)
      p.M(-30,5)  # Start path at point (-30, 5)
      p.l(60,30)  # Draw line to (60, 30)
      p.h(-70)    # Draw horizontal line to x=-70
      p.Z()       # Draw line to start
      d.append(p)