Exemplo n.º 1
0
 def draw_text_entity_2d(self, entity: DXFGraphic,
                         properties: Properties) -> None:
     d, dxftype = entity.dxf, entity.dxftype()
     if dxftype in ('TEXT', 'MTEXT', 'ATTRIB'):
         entity = cast(Union[Text, MText, Attrib], entity)
         for line, transform, cap_height in simplified_text_chunks(
                 entity, self.out, font=properties.font):
             self.out.draw_text(line, transform, properties, cap_height)
     else:
         raise TypeError(dxftype)
Exemplo n.º 2
0
 def draw_simple_mtext(self, mtext: MText, properties: Properties) -> None:
     """Draw the content of a MTEXT entity without inline formatting codes."""
     for line, transform, cap_height in simplified_text_chunks(
             mtext, self.out, font=properties.font):
         self.out.draw_text(line, transform, properties, cap_height)
Exemplo n.º 3
0
 def draw_mtext_column(self, mtext: MText, properties: Properties) -> None:
     """ Draw the content of a MTEXT entity as a single column. """
     # TODO: complex MTEXT renderer
     for line, transform, cap_height in simplified_text_chunks(
             mtext, self.out, font=properties.font):
         self.out.draw_text(line, transform, properties, cap_height)