ducpy.utils.ElementTypes¶
Attributes¶
Classes¶
Create a collection of name/value pairs. |
|
Module Contents¶
- class ducpy.utils.ElementTypes.ElementType(*args, **kwds)¶
Bases:
enum.Enum
Create a collection of name/value pairs.
Example enumeration:
>>> class Color(Enum): ... RED = 1 ... BLUE = 2 ... GREEN = 3
Access them by:
attribute access:
>>> Color.RED <Color.RED: 1>
value lookup:
>>> Color(1) <Color.RED: 1>
name lookup:
>>> Color['RED'] <Color.RED: 1>
Enumerations can be iterated over, and know how many members they have:
>>> len(Color) 3
>>> list(Color) [<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]
Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.
- RECTANGLE = 'rectangle'¶
- ELLIPSE = 'ellipse'¶
- FREEDRAW = 'freedraw'¶
- LINE = 'line'¶
- ARROW = 'arrow'¶
- IMAGE = 'image'¶
- TEXT = 'text'¶
- TABLE = 'table'¶
- FRAME = 'frame'¶
- GROUP = 'group'¶
- MAGIC_FRAME = 'magicframe'¶
- DOC = 'doc'¶
- POLYGON = 'polygon'¶
- class ducpy.utils.ElementTypes.Point¶
- x: float¶
- y: float¶
- mirroring: ducpy.utils.enums.BezierMirroring | None = None¶
- class ducpy.utils.ElementTypes.TilingProperties¶
- scale: float¶
- offset_x: float¶
- offset_y: float¶
- rotation: float¶
- class ducpy.utils.ElementTypes.ElementContentBase¶
- preference: int¶
- src: str¶
- visible: bool¶
- opacity: float¶
- tiling: TilingProperties | None = None¶
- class ducpy.utils.ElementTypes.StrokeStyleProps¶
- preference: int¶
- cap: ducpy.utils.enums.StrokeCap | None = None¶
- join: int | None = None¶
- dash: List[float] | None = None¶
- dash_cap: ducpy.utils.enums.StrokeCap | None = None¶
- miter_limit: float | None = None¶
- class ducpy.utils.ElementTypes.ElementStroke¶
- content: ElementContentBase¶
- width: float¶
- style: StrokeStyleProps¶
- placement: int¶
- stroke_sides: StrokeSides | None = None¶
- class ducpy.utils.ElementTypes.ElementBackground¶
- content: ElementContentBase¶
- class ducpy.utils.ElementTypes.PointBinding¶
- element_id: str¶
- focus: float¶
- gap: float¶
- point: BindingPoint | None = None¶
- head: int | None = None¶
- fixed_point: SimplePoint | None = None¶
- class ducpy.utils.ElementTypes.DucLineReference¶
- index: int¶
- handle: SimplePoint | None = None¶
- class ducpy.utils.ElementTypes.DucLine¶
- start: DucLineReference¶
- end: DucLineReference¶
- class ducpy.utils.ElementTypes.DucPath¶
- line_indices: List[int]¶
- background: ElementBackground¶
- stroke: ElementStroke¶
- class ducpy.utils.ElementTypes.DucTableStyleProps¶
- background_color: str | None = None¶
- border_width: float | None = None¶
- border_dashes: List[float] = []¶
- border_color: str | None = None¶
- text_color: str | None = None¶
- text_size: float | None = None¶
- text_font: str | None = None¶
- text_align: int | None = None¶
- class ducpy.utils.ElementTypes.DucTableColumn¶
- id: str¶
- width: float¶
- style: DucTableStyleProps | None = None¶
- class ducpy.utils.ElementTypes.DucTableRow¶
- id: str¶
- height: float¶
- style: DucTableStyleProps | None = None¶
- class ducpy.utils.ElementTypes.DucTableCell¶
- row_id: str¶
- column_id: str¶
- data: str | None = None¶
- style: DucTableStyleProps | None = None¶
- class ducpy.utils.ElementTypes.DucTableStyle¶
- default_props: DucTableStyleProps | None = None¶
- ducpy.utils.ElementTypes.StrokeStyle¶