KiCad PCB EDA Suite
bitmap_types.h File Reference
#include <config.h>

Go to the source code of this file.

Classes

struct  BITMAP_OPAQUE
 PNG memory record (file in memory). More...
 

Macros

#define EXTERN_BITMAP(x)   extern const BITMAP_OPAQUE x[1];
 

Typedefs

typedef const BITMAP_OPAQUEBITMAP_DEF
 a BITMAP_DEF is really a const pointer to an opaque structure. More...
 

Functions

wxBitmap KiBitmap (BITMAP_DEF aBitmap)
 Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF. More...
 
wxBitmap * KiBitmapNew (BITMAP_DEF aBitmap)
 Function KiBitmapNew allocates a wxBitmap on heap from a memory record, held in a BITMAP_DEF. More...
 

Macro Definition Documentation

#define EXTERN_BITMAP (   x)    extern const BITMAP_OPAQUE x[1];

Definition at line 46 of file bitmap_types.h.

Typedef Documentation

typedef const BITMAP_OPAQUE* BITMAP_DEF

a BITMAP_DEF is really a const pointer to an opaque structure.

So you should never need to use 'const' with it.

Definition at line 51 of file bitmap_types.h.

Function Documentation

wxBitmap KiBitmap ( BITMAP_DEF  aBitmap)

Function KiBitmap constructs a wxBitmap from a memory record, held in a BITMAP_DEF.

Definition at line 36 of file bitmap.cpp.

References BITMAP_OPAQUE::byteCount, and BITMAP_OPAQUE::png.

Referenced by CONTEXT_MENU::Add(), AddHotkeyConfigMenu(), SCH_EDIT_FRAME::addJunctionMenuEntries(), EDA_BASE_FRAME::AddMenuIconsOptions(), AddMenuItem(), PGM_BASE::AddMenuLanguageList(), AddMenusForBitmap(), AddMenusForBlock(), AddMenusForBus(), AddMenusForBusEntry(), AddMenusForComponent(), AddMenusForComponentField(), AddMenusForEditComponent(), AddMenusForGLabel(), AddMenusForHierchicalSheet(), AddMenusForHLabel(), AddMenusForLabel(), AddMenusForMarkers(), AddMenusForPin(), AddMenusForSheetPin(), AddMenusForText(), AddMenusForWire(), EDA_DRAW_FRAME::AddMenuZoomAndGrid(), AddNewItemsCommand(), LAUNCHER_PANEL::CreateCommandToolbar(), EDA_3D_VIEWER::CreateMenuBar(), LIB_EDIT_FRAME::CreateOptionToolbar(), PCB_EDIT_FRAME::createPopUpBlockMenu(), PCB_EDIT_FRAME::createPopUpMenuForFootprints(), PCB_EDIT_FRAME::createPopUpMenuForFpPads(), PCB_EDIT_FRAME::createPopUpMenuForFpTexts(), PCB_EDIT_FRAME::createPopUpMenuForMarkers(), PCB_EDIT_FRAME::createPopUpMenuForTexts(), PCB_EDIT_FRAME::createPopupMenuForTracks(), PCB_EDIT_FRAME::createPopUpMenuForZones(), dialog_about::CreateStaticBitmap(), CVPCB_MAINFRAME::CVPCB_MAINFRAME(), dialog_about::dialog_about(), DIALOG_EXIT::DIALOG_EXIT(), DIALOG_MODULE_MODULE_EDITOR::DIALOG_MODULE_MODULE_EDITOR(), DIALOG_PNS_LENGTH_TUNING_SETTINGS::DIALOG_PNS_LENGTH_TUNING_SETTINGS(), DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME(), EDA_3D_VIEWER::EDA_3D_VIEWER(), EVT_GRID_CMD_CELL_CHANGED(), EVT_TOOL(), EVT_TOOL_RANGE(), EVT_UPDATE_UI(), EVT_UPDATE_UI_RANGE(), GERBVIEW_FRAME::GERBVIEW_FRAME(), DIALOG_LIB_EDIT_PIN_TABLE::DataViewModel::Pin::GetValue(), HIERARCHY_TREE::HIERARCHY_TREE(), DIALOG_3D_VIEW_OPTIONS::initDialog(), InitKiCadAboutNew(), PANEL_PREV_3D::initPanel(), KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME(), LIB_EDIT_FRAME::LIB_EDIT_FRAME(), LIB_EDIT_FRAME::locateItem(), SCH_EDIT_FRAME::LocateItem(), FOOTPRINT_EDIT_FRAME::ModeditLocateAndDisplay(), WIZARD_3DSHAPE_LIBS_DOWNLOADER::OnPageChanged(), WIZARD_FPLIB_TABLE::OnPageChanged(), TREE_PROJECT_FRAME::OnRight(), FOOTPRINT_EDIT_FRAME::OnRightClick(), EDA_3D_CANVAS::OnRightClick(), PL_EDITOR_FRAME::OnRightClick(), GERBVIEW_FRAME::OnRightClick(), LIB_EDIT_FRAME::OnRightClick(), SCH_EDIT_FRAME::OnRightClick(), PCB_EDIT_FRAME::OnRightClick(), PCB_LAYER_WIDGET::onRightDownLayers(), SIM_PLOT_FRAME::onSimFinished(), SIM_PLOT_FRAME::onSimStarted(), PL_EDITOR_FRAME::OnTreeRightClick(), PCB_BASE_FRAME::PcbGeneralLocateAndDisplay(), PinShapeComboBox::PinShapeComboBox(), PinTypeComboBox::PinTypeComboBox(), PL_EDITOR_FRAME::PL_EDITOR_FRAME(), prepareDesignRulesMenu(), prepareDimensionsMenu(), prepareEditMenu(), prepareExportMenu(), prepareFilesMenu(), prepareHelpMenu(), prepareImportExportMenu(), prepareLibraryMenu(), preparePlaceMenu(), preparePreferencesMenu(), prepareRouteMenu(), prepareToolsMenu(), prepareViewMenu(), DIALOG_ERC::ReBuildMatrixPanel(), PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar(), KICAD_MANAGER_FRAME::RecreateBaseHToolbar(), DISPLAY_FOOTPRINTS_FRAME::ReCreateHToolbar(), LIB_VIEW_FRAME::ReCreateHToolbar(), FOOTPRINT_VIEWER_FRAME::ReCreateHToolbar(), FOOTPRINT_EDIT_FRAME::ReCreateHToolbar(), PL_EDITOR_FRAME::ReCreateHToolbar(), CVPCB_MAINFRAME::ReCreateHToolbar(), FOOTPRINT_WIZARD_FRAME::ReCreateHToolbar(), GERBVIEW_FRAME::ReCreateHToolbar(), LIB_EDIT_FRAME::ReCreateHToolbar(), SCH_EDIT_FRAME::ReCreateHToolbar(), PCB_EDIT_FRAME::ReCreateHToolbar(), EDA_3D_VIEWER::ReCreateMainToolbar(), LIB_VIEW_FRAME::ReCreateMenuBar(), FOOTPRINT_VIEWER_FRAME::ReCreateMenuBar(), CVPCB_MAINFRAME::ReCreateMenuBar(), FOOTPRINT_EDIT_FRAME::ReCreateMenuBar(), PL_EDITOR_FRAME::ReCreateMenuBar(), LIB_EDIT_FRAME::ReCreateMenuBar(), KICAD_MANAGER_FRAME::ReCreateMenuBar(), GERBVIEW_FRAME::ReCreateMenuBar(), PCB_EDIT_FRAME::ReCreateMicrowaveVToolbar(), DISPLAY_FOOTPRINTS_FRAME::ReCreateOptToolbar(), FOOTPRINT_EDIT_FRAME::ReCreateOptToolbar(), GERBVIEW_FRAME::ReCreateOptToolbar(), SCH_EDIT_FRAME::ReCreateOptToolbar(), PCB_EDIT_FRAME::ReCreateOptToolbar(), FOOTPRINT_EDIT_FRAME::ReCreateVToolbar(), PL_EDITOR_FRAME::ReCreateVToolbar(), GERBVIEW_FRAME::ReCreateVToolbar(), LIB_EDIT_FRAME::ReCreateVToolbar(), SCH_EDIT_FRAME::ReCreateVToolbar(), PCB_EDIT_FRAME::ReCreateVToolbar(), DIALOG_ERC::setDRCMatrixButtonState(), DIALOG_LIB_EDIT_PIN::SetOrientationList(), SIM_PLOT_FRAME::SIGNAL_CONTEXT_MENU::SIGNAL_CONTEXT_MENU(), SIM_PLOT_FRAME::SIM_PLOT_FRAME(), TREEPROJECTFILES::TREEPROJECTFILES(), and wxBEGIN_EVENT_TABLE().

37 {
38  wxMemoryInputStream is( aBitmap->png, aBitmap->byteCount );
39  wxImage image( is, wxBITMAP_TYPE_PNG );
40  wxBitmap bitmap( image );
41 
42  return bitmap;
43 }
const unsigned char * png
Definition: bitmap_types.h:40
wxBitmap* KiBitmapNew ( BITMAP_DEF  aBitmap)

Function KiBitmapNew allocates a wxBitmap on heap from a memory record, held in a BITMAP_DEF.

Returns
wxBitmap* - caller owns it.

Definition at line 46 of file bitmap.cpp.

References BITMAP_OPAQUE::byteCount, and BITMAP_OPAQUE::png.

Referenced by InitKiCadAboutNew().

47 {
48  wxMemoryInputStream is( aBitmap->png, aBitmap->byteCount );
49  wxImage image( is, wxBITMAP_TYPE_PNG );
50  wxBitmap* bitmap = new wxBitmap( image );
51 
52  return bitmap;
53 }
const unsigned char * png
Definition: bitmap_types.h:40