Draw a squiggly line from point p1 to point p2.
(
page: Page,
p1: point_like,
p2: point_like,
breadth: float = 2,
color: OptSeq = (0,),
dashes: OptStr = None,
width: float = 1,
lineCap: int = 0,
lineJoin: int = 0,
overlay: bool = True,
morph: OptSeq = None,
stroke_opacity: float = 1,
fill_opacity: float = 1,
oc: int = 0,
)
| 1926 | |
| 1927 | |
| 1928 | def draw_squiggle( |
| 1929 | page: Page, |
| 1930 | p1: point_like, |
| 1931 | p2: point_like, |
| 1932 | breadth: float = 2, |
| 1933 | color: OptSeq = (0,), |
| 1934 | dashes: OptStr = None, |
| 1935 | width: float = 1, |
| 1936 | lineCap: int = 0, |
| 1937 | lineJoin: int = 0, |
| 1938 | overlay: bool = True, |
| 1939 | morph: OptSeq = None, |
| 1940 | stroke_opacity: float = 1, |
| 1941 | fill_opacity: float = 1, |
| 1942 | oc: int = 0, |
| 1943 | ) -> Point: |
| 1944 | """Draw a squiggly line from point p1 to point p2.""" |
| 1945 | img = page.new_shape() |
| 1946 | p = img.draw_squiggle(Point(p1), Point(p2), breadth=breadth) |
| 1947 | img.finish( |
| 1948 | color=color, |
| 1949 | dashes=dashes, |
| 1950 | width=width, |
| 1951 | closePath=False, |
| 1952 | lineCap=lineCap, |
| 1953 | lineJoin=lineJoin, |
| 1954 | morph=morph, |
| 1955 | stroke_opacity=stroke_opacity, |
| 1956 | fill_opacity=fill_opacity, |
| 1957 | oc=oc, |
| 1958 | ) |
| 1959 | img.commit(overlay) |
| 1960 | |
| 1961 | return p |
| 1962 | |
| 1963 | |
| 1964 | def draw_zigzag( |
nothing calls this directly
no test coverage detected
searching dependent graphs…