Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Add colors
Browse files Browse the repository at this point in the history
  • Loading branch information
mawildoer committed Sep 12, 2024
1 parent da07a3e commit 78247ae
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/faebryk/libs/kicad/fileformats.py
Original file line number Diff line number Diff line change
Expand Up @@ -1466,11 +1466,21 @@ class E_type(SymEnum):
# uuid: UUID = field(default_factory=gen_uuid)


@dataclass
class C_sch_stroke:
class E_type(SymEnum):
solid = auto()
default = auto()

width: float
type: E_type
color: tuple[int, int, int, int]

@dataclass(kw_only=True)
class C_sch_circle:
center: C_xy
end: C_xy
stroke: C_stroke
stroke: C_sch_stroke
fill: C_sch_fill
uuid: UUID = field(default_factory=gen_uuid)

Expand All @@ -1480,7 +1490,7 @@ class C_sch_arc:
start: C_xy
mid: C_xy
end: C_xy
stroke: C_stroke
stroke: C_sch_stroke
uuid: UUID = field(default_factory=gen_uuid)


Expand All @@ -1498,7 +1508,7 @@ class C_sch_arc:
class C_sch_rect:
start: C_xy
end: C_xy
stroke: C_stroke
stroke: C_sch_stroke
fill: C_sch_fill
uuid: UUID = field(default_factory=gen_uuid)

Expand All @@ -1509,7 +1519,7 @@ class C_sch_polyline:
class C_pts:
xy: list[C_xy] = field(**sexp_field(multidict=True), default_factory=list)

stroke: C_stroke
stroke: C_sch_stroke
fill: C_sch_fill
pts: C_pts = field(default_factory=C_pts)

Expand Down

0 comments on commit 78247ae

Please sign in to comment.