gerbonara/docs/graphic-primitive-api.rst
2022-02-03 01:02:45 +01:00

1.2 KiB

Graphic Primitives

Graphic prmitives are the core of Gerbonara's rendering interface. Individual graphic objects such as a Gerber .Region as well as entire layers such as a .GerberFile can be rendered into a list of graphic primitives. This rendering step resolves aperture definitions, calculates out aperture macros, converts units into a given target unit, and maps complex shapes to a small number of subclasses of .GraphicPrimitive.

All graphic primitives have a ~.GraphicPrimitive.polarity_dark attribute. Its meaning is identical with .GraphicObject.polarity_dark.

gerbonara.graphic_primitives.GraphicPrimitive

The five types of Graphic Primitives

Stroked lines

gerbonara.graphic_primitives.Line

gerbonara.graphic_primitives.Arc

Filled shapes

gerbonara.graphic_primitives.Circle

gerbonara.graphic_primitives.Rectangle

gerbonara.graphic_primitives.ArcPoly