pygerber.parser.pillow package¶
Subpackages¶
- pygerber.parser.pillow.apertures package
- Submodules
- pygerber.parser.pillow.apertures.arc_mixin module
- pygerber.parser.pillow.apertures.circle module
- pygerber.parser.pillow.apertures.custom module
- pygerber.parser.pillow.apertures.flash_line_mixin module
- pygerber.parser.pillow.apertures.flash_mixin module
- pygerber.parser.pillow.apertures.obround module
- pygerber.parser.pillow.apertures.polygon module
- pygerber.parser.pillow.apertures.rectangle module
- pygerber.parser.pillow.apertures.region module
- pygerber.parser.pillow.apertures.util module
- Module contents
Submodules¶
pygerber.parser.pillow.api module¶
- class pygerber.parser.pillow.api.PillowLayerSpec(file_path: 'str', colors: 'ColorSet')[source]¶
Bases:
pygerber.parser.project_spec.LayerSpecBase- file_path: str¶
- class pygerber.parser.pillow.api.PillowProjectSpec(init_spec: Dict)[source]¶
Bases:
pygerber.parser.project_spec.ProjectSpecBase- property LayerSpecClass: pygerber.parser.pillow.api.PillowLayerSpec¶
- dpi: int = 600¶
- ignore_deprecated: bool = True¶
- image_padding: int = 0¶
- layers: List[pygerber.parser.pillow.api.PillowLayerSpec] = []¶
pygerber.parser.pillow.cli module¶
pygerber.parser.pillow.parser module¶
- class pygerber.parser.pillow.parser.ColorSet(dark: 'Color_Type', clear: 'Color_Type' = (0, 0, 0, 0), background: 'Color_Type' = (0, 0, 0, 0))[source]¶
Bases:
object- background: Tuple[float, float, float, float] = (0, 0, 0, 0)¶
- clear: Tuple[float, float, float, float] = (0, 0, 0, 0)¶
- dark: Tuple[float, float, float, float]¶
- class pygerber.parser.pillow.parser.ParserWithPillow(*, ignore_deprecated: bool = True, dpi: int = 600, colors: pygerber.parser.pillow.parser.ColorSet = ColorSet(dark=(66, 166, 66, 255), clear=(16, 66, 36, 255), background=(0, 0, 0, 0)), image_padding: int = 0)[source]¶
Bases:
pygerber.parser.parser.AbstractParser- apertureSet: ApertureSet = ApertureSet(circle=<class 'pygerber.parser.pillow.apertures.circle.PillowCircle'>, rectangle=<class 'pygerber.parser.pillow.apertures.rectangle.PillowRectangle'>, obround=<class 'pygerber.parser.pillow.apertures.obround.PillowObround'>, polygon=<class 'pygerber.parser.pillow.apertures.polygon.PillowPolygon'>, custom=<class 'pygerber.parser.pillow.apertures.custom.PillowCustom'>, region=<class 'pygerber.parser.pillow.apertures.region.PillowRegion'>)¶
- property canvas: PIL.Image.Image¶
- is_rendered: bool¶
- save(file_path: str, format: Optional[str] = None) None[source]¶
Saves rendered image. file_path A filename (string), pathlib.Path object or file object. format Optional format override. If omitted, the format to use is determined from the filename extension. If a file object was used instead of a filename, this parameter should always be used.