KiCad PCB EDA Suite
Loading...
Searching...
No Matches
LAYER_PRESENTATION Class Referenceabstract

Base class for an object that can provide information about presenting layers (colours, etc). More...

#include <layer_presentation.h>

Inheritance diagram for LAYER_PRESENTATION:
GBR_LAYER_PRESENTATION PCB_LAYER_PRESENTATION

Public Member Functions

virtual ~LAYER_PRESENTATION ()
 
virtual COLOR4D getLayerColor (int aLayer) const =0
 
virtual wxString getLayerName (int aLayer) const =0
 
void DrawColorSwatch (wxBitmap &aLayerbmp, int aLayer) const
 Fill the layer bitmap aLayerbmp with the layer color for the layer ID.
 
wxBitmapBundle CreateLayerPairIcon (int aLeftLayer, int aRightLayer, int aDefSize=24) const
 Create a layer pair "side-by-side swatch" icon for the given layer pair with the style of this presentation.
 

Static Public Member Functions

static void DrawColorSwatch (wxBitmap &aLayerbmp, const COLOR4D &aBackground, const COLOR4D &aColor)
 
static wxBitmapBundle CreateLayerPairIcon (const COLOR4D &aTopColor, const COLOR4D &aBottomColor, int aDefSize=24)
 Create a layer pair "side-by-side swatch" icon.
 

Detailed Description

Base class for an object that can provide information about presenting layers (colours, etc).

Definition at line 39 of file layer_presentation.h.

Constructor & Destructor Documentation

◆ ~LAYER_PRESENTATION()

virtual LAYER_PRESENTATION::~LAYER_PRESENTATION ( )
inlinevirtual

Definition at line 42 of file layer_presentation.h.

Member Function Documentation

◆ CreateLayerPairIcon() [1/2]

wxBitmapBundle LAYER_PRESENTATION::CreateLayerPairIcon ( const COLOR4D & aTopColor,
const COLOR4D & aBottomColor,
int aDefSize = 24 )
static

Create a layer pair "side-by-side swatch" icon.

Definition at line 135 of file layer_presentation.cpp.

References createLayerPairBitmapAtSize().

Referenced by CreateLayerPairIcon(), and PCB_EDIT_FRAME::PrepareLayerIndicator().

◆ CreateLayerPairIcon() [2/2]

wxBitmapBundle LAYER_PRESENTATION::CreateLayerPairIcon ( int aLeftLayer,
int aRightLayer,
int aDefSize = 24 ) const

Create a layer pair "side-by-side swatch" icon for the given layer pair with the style of this presentation.

Definition at line 150 of file layer_presentation.cpp.

References CreateLayerPairIcon(), and getLayerColor().

◆ DrawColorSwatch() [1/2]

◆ DrawColorSwatch() [2/2]

void LAYER_PRESENTATION::DrawColorSwatch ( wxBitmap & aLayerbmp,
int aLayer ) const

Fill the layer bitmap aLayerbmp with the layer color for the layer ID.

Definition at line 65 of file layer_presentation.cpp.

References DrawColorSwatch(), getLayerColor(), and LAYER_PCB_BACKGROUND.

◆ getLayerColor()

virtual COLOR4D LAYER_PRESENTATION::getLayerColor ( int aLayer) const
pure virtual

◆ getLayerName()

virtual wxString LAYER_PRESENTATION::getLayerName ( int aLayer) const
pure virtual

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