KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIGFX::DS_PAINTER Class Reference

Methods for painting drawing sheet items. More...

#include <ds_painter.h>

Inheritance diagram for KIGFX::DS_PAINTER:
KIGFX::PAINTER

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_SETTINGSGetSettings () 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

GALm_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
 

Detailed Description

Methods for painting drawing sheet items.

Definition at line 97 of file ds_painter.h.

Constructor & Destructor Documentation

◆ DS_PAINTER()

KIGFX::DS_PAINTER::DS_PAINTER ( GAL aGal)
inline

Definition at line 100 of file ds_painter.h.

Member Function Documentation

◆ draw() [1/6]

void KIGFX::DS_PAINTER::draw ( const DS_DRAW_ITEM_BITMAP aItem,
int  aLayer 
) const
private

◆ draw() [2/6]

void KIGFX::DS_PAINTER::draw ( const DS_DRAW_ITEM_LINE aItem,
int  aLayer 
) const
private

◆ draw() [3/6]

void KIGFX::DS_PAINTER::draw ( const DS_DRAW_ITEM_PAGE aItem,
int  aLayer 
) const
private

◆ draw() [4/6]

void KIGFX::DS_PAINTER::draw ( const DS_DRAW_ITEM_POLYPOLYGONS aItem,
int  aLayer 
) const
private

◆ draw() [5/6]

void KIGFX::DS_PAINTER::draw ( const DS_DRAW_ITEM_RECT aItem,
int  aLayer 
) const
private

◆ draw() [6/6]

◆ Draw()

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

Takes an instance of VIEW_ITEM and passes it to a function that knows how to draw the item.

Parameters
aItemis an item to be drawn.
aLayertells 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().

◆ DrawBorder()

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().

◆ GetSettings()

virtual RENDER_SETTINGS * KIGFX::DS_PAINTER::GetSettings ( )
inlineoverridevirtual

Return a pointer to current settings that are going to be used when drawing items.

Returns
Current rendering settings.

Implements KIGFX::PAINTER.

Definition at line 110 of file ds_painter.h.

References m_renderSettings.

Referenced by DS_PROXY_VIEW_ITEM::ViewDraw().

◆ 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.

Member Data Documentation

◆ m_gal

◆ m_renderSettings

DS_RENDER_SETTINGS KIGFX::DS_PAINTER::m_renderSettings
private

Definition at line 121 of file ds_painter.h.

Referenced by GetSettings().


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