KiCad PCB EDA Suite
|
Methods for painting drawing sheet items. More...
#include <ds_painter.h>
Public Member Functions | |
DS_PAINTER (GAL *aGal) | |
virtual bool | Draw (const VIEW_ITEM *, int) override |
Takes an instance of VIEW_ITEM and passes it to a function that knows how to draw the item. | |
void | DrawBorder (const PAGE_INFO *aPageInfo, int aScaleFactor) const |
virtual 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 Attributes | |
GAL * | m_gal |
Instance of graphic abstraction layer that gives an interface to call commands used to draw (eg. | |
Private Member Functions | |
void | draw (const DS_DRAW_ITEM_LINE *aItem, int aLayer) const |
void | draw (const DS_DRAW_ITEM_RECT *aItem, int aLayer) const |
void | draw (const DS_DRAW_ITEM_POLYPOLYGONS *aItem, int aLayer) const |
void | draw (const DS_DRAW_ITEM_TEXT *aItem, int aLayer) const |
void | draw (const DS_DRAW_ITEM_BITMAP *aItem, int aLayer) const |
void | draw (const DS_DRAW_ITEM_PAGE *aItem, int aLayer) const |
Private Attributes | |
DS_RENDER_SETTINGS | m_renderSettings |
Methods for painting drawing sheet items.
Definition at line 97 of file ds_painter.h.
|
inline |
Definition at line 100 of file ds_painter.h.
|
private |
Definition at line 299 of file ds_painter.cpp.
References DS_DRAW_ITEM_BITMAP::GetBoundingBox(), BOX2< Vec >::GetEnd(), BOX2< Vec >::GetOrigin(), DS_DRAW_ITEM_BASE::GetPeer(), and DS_DRAW_ITEM_BITMAP::GetPosition().
|
private |
Definition at line 239 of file ds_painter.cpp.
References DS_DRAW_ITEM_LINE::GetEnd(), DS_DRAW_ITEM_BASE::GetPenWidth(), and DS_DRAW_ITEM_LINE::GetStart().
|
private |
Definition at line 341 of file ds_painter.cpp.
References DS_DRAW_ITEM_PAGE::GetMarkerPos(), DS_DRAW_ITEM_PAGE::GetMarkerSize(), DS_DRAW_ITEM_PAGE::GetPageSize(), VECTOR2< T >::x, and VECTOR2< T >::y.
|
private |
Definition at line 259 of file ds_painter.cpp.
References DS_DRAW_ITEM_POLYPOLYGONS::GetPolygons(), SHAPE_POLY_SET::Outline(), and SHAPE_POLY_SET::OutlineCount().
|
private |
Definition at line 249 of file ds_painter.cpp.
References DS_DRAW_ITEM_RECT::GetEnd(), DS_DRAW_ITEM_BASE::GetPenWidth(), and DS_DRAW_ITEM_RECT::GetStart().
|
private |
Definition at line 275 of file ds_painter.cpp.
References color, KIFONT::FONT::Draw(), EDA_TEXT::GetAttributes(), EDA_TEXT::GetEffectiveTextPenWidth(), EDA_TEXT::GetFont(), KIFONT::FONT::GetFont(), DS_DRAW_ITEM_BASE::GetFontMetrics(), EDA_TEXT::GetShownText(), EDA_TEXT::GetTextPos(), EDA_TEXT::IsBold(), EDA_TEXT::IsItalic(), and TEXT_ATTRIBUTES::m_StrokeWidth.
|
overridevirtual |
Takes an instance of VIEW_ITEM and passes it to a function that knows how to draw the item.
aItem | is an item to be drawn. |
aLayer | tells which layer is currently rendered so that draw functions may know what to draw (eg. for pads there are separate layers for holes, because they have other dimensions then the pad itself. |
Implements KIGFX::PAINTER.
Definition at line 217 of file ds_painter.cpp.
References WSG_BITMAP_T, WSG_LINE_T, WSG_PAGE_T, WSG_POLY_T, WSG_RECT_T, and WSG_TEXT_T.
Referenced by DS_PROXY_VIEW_ITEM::ViewDraw().
void KIGFX::DS_PAINTER::DrawBorder | ( | const PAGE_INFO * | aPageInfo, |
int | aScaleFactor | ||
) | const |
Definition at line 371 of file ds_painter.cpp.
References PAGE_INFO::GetHeightMils(), and PAGE_INFO::GetWidthMils().
Referenced by DS_PROXY_VIEW_ITEM::ViewDraw().
|
inlineoverridevirtual |
Return a pointer to current settings that are going to be used when drawing items.
Implements KIGFX::PAINTER.
Definition at line 110 of file ds_painter.h.
References m_renderSettings.
Referenced by DS_PROXY_VIEW_ITEM::ViewDraw().
|
inlineinherited |
|
protectedinherited |
Instance of graphic abstraction layer that gives an interface to call commands used to draw (eg.
DrawLine, DrawCircle, etc.)
Definition at line 102 of file painter.h.
Referenced by ZONE_PAINTER::draw(), KIGFX::SCH_PAINTER::draw(), KIGFX::PCB_PAINTER::draw(), KIGFX::PCB_PAINTER::Draw(), KIGFX::GERBVIEW_PAINTER::draw(), KIGFX::GERBVIEW_PAINTER::drawApertureMacro(), KIGFX::GERBVIEW_PAINTER::drawFlashedShape(), KIGFX::SCH_PAINTER::drawItemBoundingBox(), KIGFX::GERBVIEW_PAINTER::drawPolygon(), KIGFX::SCH_PAINTER::getShadowWidth(), KIGFX::PCB_PAINTER::renderNetNameForSegment(), and KIGFX::PCB_PAINTER::strokeText().
|
private |
Definition at line 121 of file ds_painter.h.
Referenced by GetSettings().