altium monkey v2026.11.26 · gobblerito
On This Page (20)

Schematic Rendering (Paint IR)

Schematic Paint IR A0 scenes, presentation views, and SVG/PNG renderers.

20 / 20 shown
class

AltiumSchJunction

from altium_monkey import AltiumSchJunction
class AltiumSchJunction() -> 'None'

Wire junction record.

Wire junction dots (indicate T-junction or 4-way connection). Very simple - just a dot at a location.

Members (3)
KindSignatureSummary
methodparse_from_record(self, record: 'dict[str, Any]', font_manager: 'FontIDManager | None' = None) -> 'None'
propertyrecord_type -> 'SchRecordType'
methodserialize_to_record(self) -> 'dict[str, Any]'
class

SchJunctionColors

from altium_monkey import SchJunctionColors
class SchJunctionColors(wire_bgr: 'int', bus_bgr: 'int') -> 'None'

Automatic Wire and Bus/Harness colors in BGR notation.

Each integer uses its low 24 bits, matching the native color conversion. These explicit presentation inputs do not load machine preferences or change persisted manual Junction colors.

class

SchPaintCommand

from altium_monkey import SchPaintCommand
class SchPaintCommand(index: 'int', value: 'dto.Command') -> 'None'

Immutable view of one ordered Paint IR command.

Members (6)
KindSignatureSummary
propertyextensions -> 'Mapping[str, object]'
propertyfields -> 'Mapping[str, object]'
propertyindex -> 'int'
propertykind -> 'str'
propertysource -> 'SchPaintSourceLink | None'
methodto_dict(self) -> 'dict[str, object]'Return a detached mutable representation.
class

SchPaintContext

from altium_monkey import SchPaintContext
class SchPaintContext(*, parameters: 'Mapping[str, str] | None' = None, view: 'SchPaintView | None' = None) -> 'None'

Immutable snapshot of source facts required for Paint IR planning.

Members (4)
KindSignatureSummary
classmethodfor_component(cls, component: 'AltiumSchComponent', *, part_id: 'int | None' = None, display_mode: 'int | None' = None, parameters: 'Mapping[str, str] | None' = None, view: 'SchPaintView | None' = None) -> 'SchPaintContext'Snapshot a placed component through its owning document when available.
classmethodfor_document(cls, document: 'AltiumSchDoc', *, project_parameters: 'Mapping[str, str] | None' = None, designator_text_overrides: 'Mapping[str, str] | None' = None, view: 'SchPaintView | None' = None) -> 'SchPaintContext'Snapshot a complete SchDoc and its object extraction identities.
classmethodfor_symbol(cls, library: 'AltiumSchLib', symbol_name: 'str', *, part_id: 'int | None' = None, display_mode: 'int | None' = None) -> 'SchPaintContext'Snapshot one selected SchLib symbol view and its extraction identities.
propertyparameters -> 'Mapping[str, str]'Return the normalized, immutable parameter snapshot.
class

SchPaintDecodeError

from altium_monkey import SchPaintDecodeError
class SchPaintDecodeError(code: 'str', reason: 'str', *, path: 'str | None' = None, detail: 'str | None' = None) -> 'None'

Paint IR JSON text or framing could not be decoded.

class

SchPaintError

from altium_monkey import SchPaintError
class SchPaintError(code: 'str', reason: 'str', *, path: 'str | None' = None, detail: 'str | None' = None) -> 'None'

Base class for stable schematic Paint IR failures.

class

SchPaintGroup

from altium_monkey import SchPaintGroup
class SchPaintGroup(occurrence_id: 'str', name: 'str', role: 'str', paint_pass: 'str', bounds_mil: '_Rect | None', source: 'SchPaintSourceLink | None', start_index: 'int', end_index: 'int', parent_occurrence_id: 'str | None', child_occurrence_ids: 'tuple[str, ...]', direct_command_indexes: 'tuple[int, ...]', command_indexes: 'tuple[int, ...]') -> 'None'

Derived immutable view of one balanced Paint IR group span.

class

SchPaintIR

from altium_monkey import SchPaintIR
class SchPaintIR(value: 'Mapping[str, object]') -> 'None'

Immutable validated schematic Paint IR A0 document.

Members (22)
KindSignatureSummary
propertycommands -> 'tuple[SchPaintCommand, ...]'
classmethodcompose(cls, placements: 'Iterable[SchPaintPlacement]', *, viewport_mil: '_Rect | None' = None) -> 'SchPaintIR'Compose complete scene bodies in caller-provided paint order.
propertycoordinate_space -> 'Mapping[str, object]'
propertyextensions -> 'Mapping[str, object]'
methodextract_group(self, occurrence_id: 'str') -> 'SchPaintIR'Extract a group while preserving its effective transform and clips.
methodfind_groups(self, *, source_key: 'str | None' = None, unique_id: 'str | None' = None, record_kind: 'str | None' = None, role: 'str | None' = None, paint_pass: 'str | None' = None) -> 'tuple[SchPaintGroup, ...]'Return groups matching every supplied source or structural field.
classmethodfrom_dict(cls, value: 'Mapping[str, object]') -> 'SchPaintIR'Copy and validate one Paint IR mapping.
classmethodfrom_file(cls, path: 'str | Path') -> 'SchPaintIR'Read and validate one Paint IR JSON file.
classmethodfrom_json(cls, value: 'str | bytes | bytearray') -> 'SchPaintIR'Decode strictly framed Paint IR JSON.
propertygeometry_bounds_mil -> '_Rect | None'
methodget_group(self, occurrence_id: 'str') -> 'SchPaintGroup'Return one group or raise ``KeyError`` when it is absent.
propertygroups -> 'tuple[SchPaintGroup, ...]'
propertyprofile -> 'str'
propertyrealization -> 'str'
propertyresources -> 'tuple[SchPaintResource, ...]'
propertyschema -> 'str'
propertysource_kind -> 'str'
methodto_dict(self) -> 'dict[str, object]'Return a deep detached mutable representation.
methodto_json(self) -> 'str'Return RFC 8785 canonical JSON without a trailing newline.
methodto_png(self, options: 'SchPaintPngOptions | None' = None) -> 'bytes'Render this scene to PNG with output-only viewport and resolution.
propertyviewport_mil -> '_Rect | None'
methodwrite_json(self, path: 'str | Path') -> 'None'Transactionally write canonical UTF-8 JSON to an existing directory.
class

SchPaintLimitError

from altium_monkey import SchPaintLimitError
class SchPaintLimitError(code: 'str', reason: 'str', *, path: 'str | None' = None, detail: 'str | None' = None) -> 'None'

Paint IR exceeds a bounded resource ceiling.

class

SchPaintPlacement

from altium_monkey import SchPaintPlacement
class SchPaintPlacement(scene: 'SchPaintIR', instance_id: 'str', transform: '_Affine' = (1.0, 0.0, 0.0, 1.0, 0.0, 0.0)) -> 'None'

One named affine placement used to compose Paint IR scenes.

class

SchPaintPngOptions

from altium_monkey import SchPaintPngOptions
class SchPaintPngOptions(viewport_mil: '_Rect | None' = None, width_px: 'int | None' = None, height_px: 'int | None' = None, dpi: 'float | None' = None, background: 'str' = '#ffffffff', backend: "Literal['skia', 'gdiplus']" = 'skia', text_mode: "Literal['text', 'paths']" = 'text', include_editor_grid: 'bool' = False, include_editor_hotspots: 'bool' = False, max_pixels: 'int | None' = None) -> 'None'

Select a Paint IR bitmap view; large images may use substantial memory.

class

SchPaintPngRenderer

from altium_monkey import SchPaintPngRenderer
class SchPaintPngRenderer(options: 'SchPaintPngOptions | None' = None) -> 'None'

Render validated Paint IR to PNG using a selected CPU backend.

Members (1)
KindSignatureSummary
methodrender(self, document: 'SchPaintIR') -> 'bytes'Return PNG bytes for one output view.
class

SchPaintRenderError

from altium_monkey import SchPaintRenderError
class SchPaintRenderError(code: 'str', reason: 'str', *, path: 'str | None' = None, detail: 'str | None' = None) -> 'None'

Valid Paint IR cannot be represented by the requested adapter.

class

SchPaintResource

from altium_monkey import SchPaintResource
class SchPaintResource(value: 'dto.Resource') -> 'None'

Immutable validated PNG resource view.

Members (12)
KindSignatureSummary
propertydata -> 'bytes'
propertydecoded_rgba_bytes -> 'int'
propertyencoded_bytes -> 'int'
propertyencoded_sha256 -> 'str'
propertyextensions -> 'Mapping[str, object]'
propertyheight_px -> 'int'
propertyid -> 'str'
propertykind -> 'str'
propertymedia_type -> 'str'
methodto_dict(self) -> 'dict[str, object]'Return a detached mutable representation.
propertyuses -> 'tuple[str, ...]'
propertywidth_px -> 'int'
class

SchPaintSvgOptions

from altium_monkey import SchPaintSvgOptions
class SchPaintSvgOptions(width_px: 'float | None' = None, height_px: 'float | None' = None, viewport_mil: '_Rect | None' = None, padding_mil: 'float' = 0.0, background: 'str | None' = None, include_xml_declaration: 'bool' = True, include_view_box: 'bool' = True, wrap_components: 'bool' = False, include_group_metadata: 'bool' = False, include_editor_grid: 'bool' = False, include_editor_hotspots: 'bool' = False, text_mode: "Literal['text', 'paths']" = 'text', text_path_backend: "Literal['harfbuzz', 'gdiplus']" = 'harfbuzz', outline_font_families: 'tuple[str, ...]' = (), polygon_text_tolerance_mil: 'float' = 0.5, embed_bundled_fallback_fonts: 'bool' = False) -> 'None'

Output-only SVG options; default size uses 96 CSS pixels per inch.

class

SchPaintSvgRenderer

from altium_monkey import SchPaintSvgRenderer
class SchPaintSvgRenderer(options: 'SchPaintSvgOptions | None' = None) -> 'None'

Render validated schematic Paint IR through one portable SVG policy.

Members (1)
KindSignatureSummary
methodrender(self, document: 'SchPaintIR') -> 'str'Return deterministic XML 1.0 SVG for one validated document.
class

SchPaintValidationError

from altium_monkey import SchPaintValidationError
class SchPaintValidationError(code: 'str', reason: 'str', *, path: 'str | None' = None, detail: 'str | None' = None) -> 'None'

Paint IR violates its structural or semantic contract.

class

SchPaintVersionError

from altium_monkey import SchPaintVersionError
class SchPaintVersionError(code: 'str', reason: 'str', *, path: 'str | None' = None, detail: 'str | None' = None) -> 'None'

Paint IR has a missing or unsupported schema identity.

class

SchPaintView

from altium_monkey import SchPaintView
class SchPaintView(grid: 'bool' = False, hotspots: 'bool' = False, unconnected_ports_left_to_right: 'bool' = True, editor_artwork: 'bool' = True, junction_colors: 'SchJunctionColors | None' = None, auto_junctions_on_top: 'bool' = False) -> 'None'

Editor-adornment and automatic-junction presentation policy.

The editor batches paint policy in one settings state rather than growing per-call arguments. Static scenes omit grid and hotspots; editor views enable them. Transient tools, cursors and selection are separate concerns.

``junction_colors=None`` retains the deterministic standalone palette. Explicit colors apply to automatic Wire and Bus/Harness junctions only. ``auto_junctions_on_top`` draws those dots after document artwork; its default preserves Altium's source-by-source draw order.

``editor_artwork`` enables project-owned watermark and reuse-icon stand-ins, tagged so consumers can recognize or replace them.

Members (2)
KindSignatureSummary
classmethodeditor(cls, *, grid: 'bool' = True, hotspots: 'bool' = True, junction_colors: 'SchJunctionColors | None' = None, auto_junctions_on_top: 'bool' = False) -> 'SchPaintView'Return an editor view retaining supplied junction preferences.
classmethodstatic_scene(cls, *, junction_colors: 'SchJunctionColors | None' = None, auto_junctions_on_top: 'bool' = False) -> 'SchPaintView'Return a static scene with optional automatic-junction preferences.
altium-monkey v2026.11.26 · gobblerito·Docs updated 2026.11.29 17:55 UTC (0665053)