KiCad PCB EDA Suite
Loading...
Searching...
No Matches
ZONE_PAINTER Class Reference

#include <zone_painter.h>

Inheritance diagram for ZONE_PAINTER:
KIGFX::PCB_PAINTER KIGFX::PAINTER

Public Member Functions

bool Draw (const KIGFX::VIEW_ITEM *aItem, int aLayer) override
 
void draw (const BOARD_EDGES_BOUNDING_ITEM *aBox, int aLayer)
 
virtual PCB_RENDER_SETTINGS * GetSettings () override
 Return a pointer to current settings that are going to be used when drawing items.
 
void SetGAL (GAL *aGal)
 Changes Graphics Abstraction Layer used for drawing items for a new one.
 

Protected Member Functions

PCB_VIEWERS_SETTINGS_BASEviewer_settings ()
 
void draw (const PCB_TRACK *aTrack, int aLayer)
 
void draw (const PCB_ARC *aArc, int aLayer)
 
void draw (const PCB_VIA *aVia, int aLayer)
 
void draw (const PAD *aPad, int aLayer)
 
void draw (const PCB_SHAPE *aSegment, int aLayer)
 
void draw (const PCB_REFERENCE_IMAGE *aBitmap, int aLayer)
 
void draw (const PCB_TEXT *aText, int aLayer)
 
void draw (const PCB_TEXTBOX *aText, int aLayer)
 
void draw (const PCB_TABLE *aTable, int aLayer)
 
void draw (const FOOTPRINT *aFootprint, int aLayer)
 
void draw (const PCB_GROUP *aGroup, int aLayer)
 
void draw (const ZONE *aZone, int aLayer)
 
void draw (const PCB_DIMENSION_BASE *aDimension, int aLayer)
 
void draw (const PCB_TARGET *aTarget)
 
void draw (const PCB_MARKER *aMarker, int aLayer)
 
int getLineThickness (int aActualThickness) const
 Get the thickness to draw for a line (e.g.
 
virtual PAD_DRILL_SHAPE getDrillShape (const PAD *aPad) const
 Return drill shape of a pad.
 
virtual SHAPE_SEGMENT getPadHoleShape (const PAD *aPad) const
 Return hole shape for a pad (internal units).
 
virtual int getViaDrillSize (const PCB_VIA *aVia) const
 Return drill diameter for a via (internal units).
 
void strokeText (const wxString &aText, const VECTOR2I &aPosition, const TEXT_ATTRIBUTES &aAttrs, const KIFONT::METRICS &aFontMetrics)
 
void renderNetNameForSegment (const SHAPE_SEGMENT &aSeg, const COLOR4D &aColor, const wxString &aNetName) const
 

Protected Attributes

PCB_RENDER_SETTINGS m_pcbSettings
 
FRAME_T m_frameType
 
int m_maxError
 
int m_holePlatingThickness
 
int m_lockedShadowMargin
 
GAL * m_gal
 Instance of graphic abstraction layer that gives an interface to call commands used to draw (eg.
 

Detailed Description

Definition at line 32 of file zone_painter.h.

Member Function Documentation

◆ draw() [1/16]

◆ draw() [2/16]

◆ Draw()

bool ZONE_PAINTER::Draw ( const KIGFX::VIEW_ITEM aItem,
int  aLayer 
)
overridevirtual

Reimplemented from KIGFX::PCB_PAINTER.

Definition at line 46 of file zone_painter.cpp.

References draw(), and KIGFX::PCB_PAINTER::Draw().

◆ draw() [3/16]

void PCB_PAINTER::draw ( const PAD aPad,
int  aLayer 
)
protectedinherited

Definition at line 1192 of file pcb_painter.cpp.

References SEG::A, ANGLE_90, ANGLE_HORIZONTAL, SHAPE_POLY_SET::Append(), EDA_ANGLE::AsRadians(), SEG::B, B_Mask, B_Paste, KIGFX::GAL::BitmapText(), BOX2< Vec >::Centre(), color, SHAPE_SIMPLE::CPoint(), SHAPE_POLY_SET::Deflate(), KIGFX::GAL::DrawCircle(), KIGFX::GAL::DrawPolygon(), KIGFX::GAL::DrawRectangle(), KIGFX::GAL::DrawSegment(), BOARD_ITEM::Duplicate(), ERROR_INSIDE, F_Mask, F_Paste, PAD::FlashLayer(), KIGFX::RENDER_SETTINGS::GetActiveLayer(), PAD::GetAttribute(), BOARD_ITEM::GetBoard(), EDA_SHAPE::GetBotRight(), PAD::GetBoundingBox(), SHAPE_CIRCLE::GetCenter(), PCB_SHAPE::GetCenter(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), BOARD_CONNECTED_ITEM::GetDisplayNetname(), PAD::GetEffectiveHoleShape(), PAD::GetEffectiveShape(), BOARD::GetEnabledLayers(), SHAPE_RECT::GetHeight(), KIGFX::RENDER_SETTINGS::GetLayerColor(), PAD::GetNumber(), PAD::GetOrientation(), PAD::GetOwnClearance(), KIGFX::PCB_PAINTER::getPadHoleShape(), BOARD_ITEM::GetParentFootprint(), PAD::GetPinFunction(), SHAPE_RECT::GetPosition(), PAD::GetPrimitives(), KIGFX::RENDER_SETTINGS::GetPrintLayers(), SHAPE_CIRCLE::GetRadius(), SHAPE_SEGMENT::GetSeg(), SHAPE_SIMPLE::GetSegment(), SHAPE_SIMPLE::GetSegmentCount(), EDA_SHAPE::GetShape(), PAD::GetShape(), SHAPE_RECT::GetSize(), BOX2< Vec >::GetSize(), PAD::GetSize(), PAD::GetSolderMaskExpansion(), PAD::GetSolderPasteMargin(), EDA_SHAPE::GetTopLeft(), BOARD::GetVisibleLayers(), SHAPE_RECT::GetWidth(), SHAPE_SEGMENT::GetWidth(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_V_ALIGN_CENTER, FOOTPRINT::GraphicalItems(), IsCopperLayer(), EDA_ITEM::IsEntered(), PAD::IsFreePad(), IsNetnameLayer(), PAD::IsNoConnectPad(), KIGFX::RENDER_SETTINGS::IsPrinting(), PCB_SHAPE::IsProxyItem(), EDA_ITEM::IsSelected(), KiROUND(), LAYER_NON_PLATEDHOLES, LAYER_PAD_HOLEWALLS, LAYER_PAD_PLATEDHOLES, LAYER_PADS_SMD_BK, LAYER_PADS_SMD_FR, LAYER_PADS_TH, PCBNEW_SETTINGS::m_Display, PCB_VIEWERS_SETTINGS_BASE::VIEWERS_DISPLAY_OPTIONS::m_DisplayPadFill, KIGFX::PCB_RENDER_SETTINGS::m_ForcePadSketchModeOn, KIGFX::PAINTER::m_gal, KIGFX::PCB_PAINTER::m_holePlatingThickness, KIGFX::RENDER_SETTINGS::m_isPrinting, KIGFX::PCB_PAINTER::m_maxError, PCBNEW_SETTINGS::DISPLAY_OPTIONS::m_NetNames, KIGFX::RENDER_SETTINGS::m_outlineWidth, PCBNEW_SETTINGS::DISPLAY_OPTIONS::m_PadClearance, KIGFX::PCB_PAINTER::m_pcbSettings, PCB_VIEWERS_SETTINGS_BASE::m_ViewersDisplay, KIGFX::PCB_RENDER_SETTINGS::MAX_FONT_SIZE, SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::Outline(), PCB_SHAPE_T, pcbconfig(), SHAPE_LINE_CHAIN::PointCount(), SHAPE_SIMPLE::PointCount(), PrintableCharCount(), KIGFX::GAL::ResetTextAttributes(), KIGFX::GAL::Restore(), KIGFX::GAL::Rotate(), RotatePoint(), KIGFX::GAL::Save(), KIGFX::GAL::SetFillColor(), KIGFX::GAL::SetFontBold(), KIGFX::GAL::SetFontItalic(), KIGFX::GAL::SetFontUnderlined(), KIGFX::GAL::SetGlyphSize(), KIGFX::GAL::SetHorizontalJustify(), KIGFX::GAL::SetIsFill(), KIGFX::GAL::SetIsStroke(), KIGFX::GAL::SetLineWidth(), KIGFX::GAL::SetStrokeColor(), KIGFX::GAL::SetTextMirrored(), KIGFX::GAL::SetVerticalJustify(), SH_CIRCLE, SH_RECT, SH_SEGMENT, SH_SIMPLE, PAD::ShapePos(), ToLAYER_ID(), PAD::TransformShapeToPolygon(), KIGFX::GAL::Translate(), UnescapeString(), SHAPE_SIMPLE::Vertices(), KIGFX::PCB_PAINTER::viewer_settings(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ draw() [4/16]

◆ draw() [5/16]

◆ draw() [6/16]

◆ draw() [7/16]

◆ draw() [8/16]

◆ draw() [9/16]

void PCB_PAINTER::draw ( const PCB_SHAPE aSegment,
int  aLayer 
)
protectedinherited

Definition at line 1759 of file pcb_painter.cpp.

References SHAPE_POLY_SET::Append(), SHAPE_POLY_SET::CacheTriangulation(), EDA_SHAPE::CalcArcAngles(), color, KIGFX::GAL::DrawArcSegment(), KIGFX::GAL::DrawCircle(), KIGFX::GAL::DrawCurve(), KIGFX::GAL::DrawLine(), KIGFX::GAL::DrawPolygon(), KIGFX::GAL::DrawSegment(), KIGFX::GAL::DrawSegmentChain(), EDA_SHAPE::GetBezierC1(), EDA_SHAPE::GetBezierC2(), EDA_SHAPE::GetBezierPoints(), PCB_SHAPE::GetCenter(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), BOARD_CONNECTED_ITEM::GetDisplayNetname(), EDA_SHAPE::GetEnd(), PCB_SHAPE::GetLayer(), STROKE_PARAMS::GetLineStyle(), KIGFX::PCB_PAINTER::getLineThickness(), BOARD_CONNECTED_ITEM::GetNetCode(), BEZIER_POLY::GetPoly(), EDA_SHAPE::GetRadius(), EDA_SHAPE::GetRectCorners(), EDA_SHAPE::GetShape(), PCB_SHAPE::GetSolderMaskExpansion(), EDA_SHAPE::GetStart(), PCB_SHAPE::GetStroke(), PCB_SHAPE::GetWidth(), PCB_SHAPE::HasSolderMask(), SHAPE_POLY_SET::Inflate(), IsExternalCopperLayer(), EDA_SHAPE::IsFilled(), IsNetnameLayer(), KIGFX::GAL::IsOpenGlEngine(), PCB_SHAPE::IsProxyItem(), IsSolderMaskLayer(), SHAPE_POLY_SET::IsTriangulationUpToDate(), LAYER_LOCKED_ITEM_SHADOW, PCB_VIEWERS_SETTINGS_BASE::VIEWERS_DISPLAY_OPTIONS::m_DisplayGraphicsFill, KIGFX::PCB_PAINTER::m_frameType, KIGFX::PAINTER::m_gal, KIGFX::PCB_PAINTER::m_lockedShadowMargin, KIGFX::PCB_PAINTER::m_maxError, KIGFX::RENDER_SETTINGS::m_outlineWidth, KIGFX::PCB_PAINTER::m_pcbSettings, PCB_VIEWERS_SETTINGS_BASE::m_ViewersDisplay, EDA_SHAPE::MakeEffectiveShapes(), SHAPE_POLY_SET::NewOutline(), SHAPE_POLY_SET::Outline(), SHAPE_POLY_SET::OutlineCount(), pcbconfig(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), VECTOR2< T >::Resize(), KIGFX::GAL::SetFillColor(), KIGFX::GAL::SetIsFill(), KIGFX::GAL::SetIsStroke(), KIGFX::GAL::SetLineWidth(), KIGFX::GAL::SetStrokeColor(), STROKE_PARAMS::Stroke(), NETINFO_LIST::UNCONNECTED, and KIGFX::PCB_PAINTER::viewer_settings().

◆ draw() [10/16]

◆ draw() [11/16]

◆ draw() [12/16]

void PCB_PAINTER::draw ( const PCB_TEXT aText,
int  aLayer 
)
protectedinherited

Definition at line 2156 of file pcb_painter.cpp.

References color, KIGFX::GAL::DrawGlyphs(), KIGFX::GAL::DrawLine(), KIGFX::GAL::DrawPolygon(), ERROR_INSIDE, ERROR_OUTSIDE, SHAPE_POLY_SET::Fracture(), EDA_TEXT::GetAttributes(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), KIGFX::RENDER_SETTINGS::GetDefaultFont(), PCB_TEXT::GetDrawRotation(), EDA_TEXT::GetEffectiveTextPenWidth(), EDA_TEXT::GetFont(), KIFONT::FONT::GetFont(), BOARD_ITEM::GetFontMetrics(), BOARD_ITEM::GetLayer(), KIGFX::PCB_PAINTER::getLineThickness(), BOARD_ITEM::GetParentFootprint(), FOOTPRINT::GetPosition(), EDA_TEXT::GetRenderCache(), PCB_TEXT::GetShownText(), EDA_TEXT::GetTextBox(), EDA_TEXT::GetTextPos(), BOX2< Vec >::GetWidth(), EDA_TEXT::IsBold(), KIGFX::GAL::IsFlippedX(), EDA_TEXT::IsItalic(), BOARD_ITEM::IsKnockout(), KIFONT::FONT::IsOutline(), EDA_ITEM::IsSelected(), BOARD_ITEM::IsSideSpecific(), LAYER_ANCHOR, LAYER_LOCKED_ITEM_SHADOW, TEXT_ATTRIBUTES::m_Angle, PCB_VIEWERS_SETTINGS_BASE::VIEWERS_DISPLAY_OPTIONS::m_DisplayTextFill, KIGFX::PAINTER::m_gal, KIGFX::PCB_PAINTER::m_lockedShadowMargin, KIGFX::PCB_PAINTER::m_maxError, TEXT_ATTRIBUTES::m_Mirrored, KIGFX::RENDER_SETTINGS::m_outlineWidth, KIGFX::PCB_PAINTER::m_pcbSettings, TEXT_ATTRIBUTES::m_StrokeWidth, PCB_VIEWERS_SETTINGS_BASE::m_ViewersDisplay, TEXT_ATTRIBUTES::m_Visible, SHAPE_POLY_SET::PM_FAST, RotatePoint(), KIGFX::GAL::SetFillColor(), KIGFX::GAL::SetIsFill(), KIGFX::GAL::SetIsStroke(), KIGFX::GAL::SetLineWidth(), KIGFX::GAL::SetStrokeColor(), KIGFX::PCB_PAINTER::strokeText(), PCB_TEXT::TransformShapeToPolygon(), PCB_TEXT::TransformTextToPolySet(), and KIGFX::PCB_PAINTER::viewer_settings().

◆ draw() [13/16]

◆ draw() [14/16]

◆ draw() [15/16]

void PCB_PAINTER::draw ( const PCB_VIA aVia,
int  aLayer 
)
protectedinherited

Definition at line 938 of file pcb_painter.cpp.

References ANGLE_HORIZONTAL, B_Cu, B_Mask, KIGFX::GAL::BitmapText(), PCB_VIA::BottomLayer(), KIGFX::COLOR4D::CLEAR, color, DEGREES_T, KIGFX::PCB_PAINTER::draw(), KIGFX::GAL::DrawArc(), KIGFX::GAL::DrawCircle(), F_Cu, F_Mask, PCB_VIA::FlashLayer(), KIGFX::RENDER_SETTINGS::GetActiveLayer(), BOARD_ITEM::GetBoard(), KIGFX::PCB_RENDER_SETTINGS::GetColor(), BOARD::GetCopperLayerCount(), BOARD::GetDesignSettings(), BOARD_CONNECTED_ITEM::GetDisplayNetname(), BOARD::GetEnabledLayers(), BOARD_CONNECTED_ITEM::GetNetname(), BOARD_CONNECTED_ITEM::GetOwnClearance(), KIGFX::RENDER_SETTINGS::GetPrintLayers(), PCB_TRACK::GetStart(), KIGFX::PCB_PAINTER::getViaDrillSize(), PCB_VIA::GetViaType(), BOARD::GetVisibleLayers(), PCB_VIA::GetWidth(), GR_TEXT_H_ALIGN_CENTER, GR_TEXT_V_ALIGN_CENTER, IsCopperLayer(), IsNetnameLayer(), PCB_VIA::IsOnLayer(), KIGFX::RENDER_SETTINGS::IsPrinting(), EDA_ITEM::IsSelected(), LAYER_LOCKED_ITEM_SHADOW, LAYER_VIA_HOLES, LAYER_VIA_HOLEWALLS, PCB_VIA::LayerPair(), PCBNEW_SETTINGS::m_Display, PCBNEW_SETTINGS::DISPLAY_OPTIONS::m_DisplayViaFill, KIGFX::PAINTER::m_gal, KIGFX::PCB_PAINTER::m_holePlatingThickness, KIGFX::RENDER_SETTINGS::m_isPrinting, KIGFX::PCB_PAINTER::m_lockedShadowMargin, PCBNEW_SETTINGS::DISPLAY_OPTIONS::m_NetNames, KIGFX::RENDER_SETTINGS::m_outlineWidth, KIGFX::PCB_PAINTER::m_pcbSettings, BOARD_DESIGN_SETTINGS::m_SolderMaskExpansion, PCBNEW_SETTINGS::DISPLAY_OPTIONS::m_TrackClearance, KIGFX::PCB_RENDER_SETTINGS::MAX_FONT_SIZE, pcbconfig(), PrintableCharCount(), KIGFX::GAL::ResetTextAttributes(), KIGFX::GAL::Restore(), KIGFX::GAL::Save(), KIGFX::GAL::SetFillColor(), KIGFX::GAL::SetFontBold(), KIGFX::GAL::SetFontItalic(), KIGFX::GAL::SetFontUnderlined(), KIGFX::GAL::SetGlyphSize(), KIGFX::GAL::SetHorizontalJustify(), KIGFX::GAL::SetIsFill(), KIGFX::GAL::SetIsStroke(), KIGFX::GAL::SetLineWidth(), KIGFX::GAL::SetStrokeColor(), KIGFX::GAL::SetTextMirrored(), KIGFX::GAL::SetVerticalJustify(), SHOW_WITH_VIA_ALWAYS, ToLAYER_ID(), PCB_VIA::TopLayer(), KIGFX::GAL::Translate(), VECTOR2< T >::x, and VECTOR2< T >::y.

◆ draw() [16/16]

◆ getDrillShape()

PAD_DRILL_SHAPE PCB_PAINTER::getDrillShape ( const PAD aPad) const
protectedvirtualinherited

Return drill shape of a pad.

Reimplemented in KIGFX::PCB_PRINT_PAINTER.

Definition at line 522 of file pcb_painter.cpp.

References PAD::GetDrillShape().

Referenced by KIGFX::PCB_PRINT_PAINTER::getDrillShape().

◆ getLineThickness()

int PCB_PAINTER::getLineThickness ( int  aActualThickness) const
protectedinherited

Get the thickness to draw for a line (e.g.

0 thickness lines get a minimum value).

Parameters
aActualThicknessline own thickness
Returns
the thickness to draw

Definition at line 510 of file pcb_painter.cpp.

References KIGFX::RENDER_SETTINGS::m_outlineWidth, and KIGFX::PCB_PAINTER::m_pcbSettings.

Referenced by KIGFX::PCB_PAINTER::draw().

◆ getPadHoleShape()

SHAPE_SEGMENT PCB_PAINTER::getPadHoleShape ( const PAD aPad) const
protectedvirtualinherited

Return hole shape for a pad (internal units).

Reimplemented in KIGFX::PCB_PRINT_PAINTER.

Definition at line 528 of file pcb_painter.cpp.

References PAD::GetEffectiveHoleShape().

Referenced by KIGFX::PCB_PAINTER::draw(), and KIGFX::PCB_PRINT_PAINTER::getPadHoleShape().

◆ GetSettings()

◆ getViaDrillSize()

int PCB_PAINTER::getViaDrillSize ( const PCB_VIA aVia) const
protectedvirtualinherited

Return drill diameter for a via (internal units).

Reimplemented in KIGFX::PCB_PRINT_PAINTER.

Definition at line 535 of file pcb_painter.cpp.

References PCB_VIA::GetDrillValue().

Referenced by KIGFX::PCB_PAINTER::draw(), and KIGFX::PCB_PRINT_PAINTER::getViaDrillSize().

◆ renderNetNameForSegment()

◆ SetGAL()

void KIGFX::PAINTER::SetGAL ( GAL aGal)
inlineinherited

Changes Graphics Abstraction Layer used for drawing items for a new one.

Parameters
aGalis the new GAL instance.

Definition at line 76 of file painter.h.

◆ strokeText()

◆ viewer_settings()

Member Data Documentation

◆ m_frameType

FRAME_T KIGFX::PCB_PAINTER::m_frameType
protectedinherited

Definition at line 236 of file pcb_painter.h.

Referenced by KIGFX::PCB_PAINTER::draw(), and KIGFX::PCB_PAINTER::viewer_settings().

◆ m_gal

◆ m_holePlatingThickness

int KIGFX::PCB_PAINTER::m_holePlatingThickness
protectedinherited

Definition at line 239 of file pcb_painter.h.

Referenced by KIGFX::PCB_PAINTER::draw(), and KIGFX::PCB_PAINTER::Draw().

◆ m_lockedShadowMargin

int KIGFX::PCB_PAINTER::m_lockedShadowMargin
protectedinherited

Definition at line 240 of file pcb_painter.h.

Referenced by KIGFX::PCB_PAINTER::draw(), and KIGFX::PCB_PAINTER::Draw().

◆ m_maxError

int KIGFX::PCB_PAINTER::m_maxError
protectedinherited

Definition at line 238 of file pcb_painter.h.

Referenced by KIGFX::PCB_PAINTER::draw(), and KIGFX::PCB_PAINTER::Draw().

◆ m_pcbSettings

PCB_RENDER_SETTINGS KIGFX::PCB_PAINTER::m_pcbSettings
protectedinherited

The documentation for this class was generated from the following files: