Classes
Overview
The classes module in ducpy
provides Python class definitions that represent the various components of a duc file. These classes define the structure and properties of elements, application state, and binary files in a duc document.
Main Classes
DucElement
The DucElement
class is the base class for all elements in a duc file:
The DucElementUnion
is a type union that can represent any specific element type (text, line, image, etc.).
AppState
The AppState
class represents the state of the application when the duc file was saved:
BinaryFiles
The BinaryFiles
class stores binary data (such as images) embedded in the duc file:
Element Types
The duc format supports several element types, each represented by specific classes:
Text Element
Text elements represent text objects in the duc document:
Line Element
Line elements represent vector lines:
Image Element
Image elements represent embedded images:
Relationships Between Classes
The duc file structure has hierarchical relationships between its components:
- A duc file contains elements, app state, and binary files
- Elements can be grouped and have parent-child relationships
- Elements can reference binary files for content
- App state contains information about the view and selected elements
Understanding these relationships is crucial for effective manipulation of duc files.
Last updated on