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.
 
std::unique_ptr< wxBitmap > CreateLayerPairIcon (int aLeftLayer, int aRightLayer, int aScale) 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 std::unique_ptr< wxBitmap > CreateLayerPairIcon (const KIGFX::COLOR4D &aBgColor, const KIGFX::COLOR4D &aTopColor, const KIGFX::COLOR4D &aBottomColor, int aScale)
 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 38 of file layer_presentation.h.

Constructor & Destructor Documentation

◆ ~LAYER_PRESENTATION()

virtual LAYER_PRESENTATION::~LAYER_PRESENTATION ( )
inlinevirtual

Definition at line 41 of file layer_presentation.h.

Member Function Documentation

◆ CreateLayerPairIcon() [1/2]

std::unique_ptr< wxBitmap > LAYER_PRESENTATION::CreateLayerPairIcon ( const KIGFX::COLOR4D aBgColor,
const KIGFX::COLOR4D aTopColor,
const KIGFX::COLOR4D aBottomColor,
int  aScale 
)
static

◆ CreateLayerPairIcon() [2/2]

std::unique_ptr< wxBitmap > LAYER_PRESENTATION::CreateLayerPairIcon ( int  aLeftLayer,
int  aRightLayer,
int  aScale 
) const

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

Definition at line 163 of file layer_presentation.cpp.

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

◆ 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 63 of file layer_presentation.cpp.

References color, 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: