MCPcopy Create free account
hub / github.com/Paper2Poster/Paper2Poster / to_html

Method to_html

utils/src/presentation.py:671–683  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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&#x27;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
686class Placeholder(ShapeElement):

Callers

nothing calls this directly

Calls 1

get_inline_styleMethod · 0.45

Tested by

no test coverage detected