KiCad PCB EDA Suite
|
Base class for an object that can provide information about presenting layers (colours, etc). More...
#include <layer_presentation.h>
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. | |
Base class for an object that can provide information about presenting layers (colours, etc).
Definition at line 38 of file layer_presentation.h.
|
inlinevirtual |
Definition at line 41 of file layer_presentation.h.
|
static |
Create a layer pair "side-by-side swatch" icon.
Definition at line 108 of file layer_presentation.cpp.
References BM_LAYERICON_SIZE, ICON_BLACK, ICON_WHITE, image, s_BitmapLayerIcon, KIGFX::COLOR4D::ToColour(), and KIGFX::COLOR4D::WithAlpha().
Referenced by CreateLayerPairIcon(), COPPER_LAYERS_PAIR_PRESETS_UI::fillRowFromLayerPair(), and PCB_EDIT_FRAME::PrepareLayerIndicator().
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.
|
static |
Definition at line 35 of file layer_presentation.cpp.
References KIGFX::COLOR4D::ToColour(), KIGFX::COLOR4D::UNSPECIFIED, and KIGFX::COLOR4D::WithAlpha().
Referenced by PANEL_SETUP_BOARD_STACKUP::createColorBox(), GRID_CELL_LAYER_RENDERER::Draw(), DrawColorSwatch(), PANEL_SETUP_BOARD_STACKUP::onColorSelected(), and PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard().
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.
|
pure virtual |
Implemented in GBR_LAYER_PRESENTATION, and PCB_LAYER_PRESENTATION.
Referenced by CreateLayerPairIcon(), and DrawColorSwatch().
|
pure virtual |
Implemented in GBR_LAYER_PRESENTATION, and PCB_LAYER_PRESENTATION.