Returns HTML representation. This could be empty, or you could provide something like an path if you have a means to convert the freeform's geometry to an SVG path. For now, just pretend it has no textual content.
(self, style_args: StyleArg)
| 669 | return shape |
| 670 | |
| 671 | def to_html(self, style_args: StyleArg) -> str: |
| 672 | """ |
| 673 | Returns HTML representation. This could be empty, or you could provide |
| 674 | something like an <svg> path if you have a means to convert the freeform's |
| 675 | geometry to an SVG path. For now, just pretend it has no textual content. |
| 676 | """ |
| 677 | # If you want to attempt an SVG path, you'd do it here. A minimal example: |
| 678 | # <svg width="..." height="..."><path d="M0,0 L10,10 L20,0 z" /></svg> |
| 679 | return ( |
| 680 | f"{self.indent}<div data-shape-type='freeform'{self.get_inline_style(style_args)}>" |
| 681 | f"\n{self.indent} <!-- freeform geometry not rendered in HTML -->" |
| 682 | f"\n{self.indent}</div>\n" |
| 683 | ) |
| 684 | |
| 685 | |
| 686 | class Placeholder(ShapeElement): |
nothing calls this directly
no test coverage detected