KiCad PCB EDA Suite
Loading...
Searching...
No Matches
BITMAP2CMP_PANEL Class Reference

#include <bitmap2cmp_panel.h>

Inheritance diagram for BITMAP2CMP_PANEL:
BITMAP2CMP_PANEL_BASE

Public Member Functions

 BITMAP2CMP_PANEL (BITMAP2CMP_FRAME *aParent)
 
 ~BITMAP2CMP_PANEL ()
 
bool OpenProjectFiles (const std::vector< wxString > &aFilenames, int aCtl=0)
 
void OnLoadFile (wxCommandEvent &event) override
 
void LoadSettings (BITMAP2CMP_SETTINGS *aCfg)
 
void SaveSettings (BITMAP2CMP_SETTINGS *aCfg)
 
wxWindow * GetCurrentPage ()
 
IMAGE_SIZE GetOutputSizeX () const
 
IMAGE_SIZE GetOutputSizeY () const
 
void SetOutputSize (const IMAGE_SIZE &aSizeX, const IMAGE_SIZE &aSizeY)
 
void ExportToBuffer (std::string &aOutput, OUTPUT_FMT_ID aFormat)
 generate a export data of the current bitmap.
 

Protected Attributes

wxNotebook * m_Notebook
 
wxScrolledWindow * m_InitialPicturePanel
 
wxScrolledWindow * m_GreyscalePicturePanel
 
wxScrolledWindow * m_BNPicturePanel
 
wxStaticText * m_staticTextISize
 
wxStaticText * m_SizeXValue
 
wxStaticText * m_SizeYValue
 
wxStaticText * m_SizePixUnits
 
wxStaticText * m_staticTextDPI
 
wxStaticText * m_InputXValueDPI
 
wxStaticText * m_InputYValueDPI
 
wxStaticText * m_DPIUnit
 
wxStaticText * m_staticTextBPP
 
wxStaticText * m_BPPValue
 
wxStaticText * m_BPPunits
 
wxButton * m_buttonLoad
 
wxTextCtrl * m_UnitSizeX
 
wxTextCtrl * m_UnitSizeY
 
wxChoice * m_PixelUnit
 
wxCheckBox * m_aspectRatioCheckbox
 
wxStaticText * m_ThresholdText
 
wxSlider * m_sliderThreshold
 
wxCheckBox * m_checkNegative
 
wxRadioButton * m_rbSymbol
 
wxRadioButton * m_rbFootprint
 
wxStaticText * m_layerLabel
 
wxChoice * m_layerCtrl
 
wxRadioButton * m_rbPostscript
 
wxRadioButton * m_rbWorksheet
 
wxButton * m_buttonExportFile
 
wxButton * m_buttonExportClipboard
 

Private Member Functions

void OnPaintInit (wxPaintEvent &event) override
 
void OnPaintGreyscale (wxPaintEvent &event) override
 
void OnPaintBW (wxPaintEvent &event) override
 
void OnExportToFile (wxCommandEvent &event) override
 
void OnExportToClipboard (wxCommandEvent &event) override
 
void OnFormatChange (wxCommandEvent &event) override
 
void OnNegativeClicked (wxCommandEvent &event) override
 
void OnThresholdChange (wxScrollEvent &event) override
 
void OnSizeChangeX (wxCommandEvent &event) override
 
void OnSizeChangeY (wxCommandEvent &event) override
 
void OnSizeUnitChange (wxCommandEvent &event) override
 
void ToggleAspectRatioLock (wxCommandEvent &event) override
 
OUTPUT_FMT_ID getOutputFormat ()
 
EDA_UNITS getUnitFromSelection ()
 
wxString formatOutputSize (double aSize)
 
void binarize (double aThreshold)
 
void negateGreyscaleImage ()
 
void updateImageInfo ()
 

Private Attributes

BITMAP2CMP_FRAMEm_parentFrame
 
wxImage m_Pict_Image
 
wxBitmap m_Pict_Bitmap
 
wxImage m_Greyscale_Image
 
wxBitmap m_Greyscale_Bitmap
 
wxImage m_NB_Image
 
wxBitmap m_BN_Bitmap
 
IMAGE_SIZE m_outputSizeX
 
IMAGE_SIZE m_outputSizeY
 
bool m_negative
 
double m_aspectRatio
 
wxStaticText * m_sizeLabel
 

Detailed Description

Definition at line 68 of file bitmap2cmp_panel.h.

Constructor & Destructor Documentation

◆ BITMAP2CMP_PANEL()

◆ ~BITMAP2CMP_PANEL()

BITMAP2CMP_PANEL::~BITMAP2CMP_PANEL ( )
inline

Definition at line 72 of file bitmap2cmp_panel.h.

Member Function Documentation

◆ binarize()

void BITMAP2CMP_PANEL::binarize ( double  aThreshold)
private

◆ ExportToBuffer()

void BITMAP2CMP_PANEL::ExportToBuffer ( std::string &  aOutput,
OUTPUT_FMT_ID  aFormat 
)

◆ formatOutputSize()

wxString BITMAP2CMP_PANEL::formatOutputSize ( double  aSize)
private

◆ GetCurrentPage()

wxWindow * BITMAP2CMP_PANEL::GetCurrentPage ( )

Definition at line 64 of file bitmap2cmp_panel.cpp.

References BITMAP2CMP_PANEL_BASE::m_Notebook.

Referenced by BITMAP2CMP_FRAME::GetToolCanvas().

◆ getOutputFormat()

OUTPUT_FMT_ID BITMAP2CMP_PANEL::getOutputFormat ( )
private

◆ GetOutputSizeX()

IMAGE_SIZE BITMAP2CMP_PANEL::GetOutputSizeX ( ) const
inline

Definition at line 83 of file bitmap2cmp_panel.h.

References m_outputSizeX.

Referenced by BITMAP2CMP_FRAME::ShowChangedLanguage().

◆ GetOutputSizeY()

IMAGE_SIZE BITMAP2CMP_PANEL::GetOutputSizeY ( ) const
inline

Definition at line 84 of file bitmap2cmp_panel.h.

References m_outputSizeY.

Referenced by BITMAP2CMP_FRAME::ShowChangedLanguage().

◆ getUnitFromSelection()

EDA_UNITS BITMAP2CMP_PANEL::getUnitFromSelection ( )
private

◆ LoadSettings()

◆ negateGreyscaleImage()

void BITMAP2CMP_PANEL::negateGreyscaleImage ( )
private

Definition at line 423 of file bitmap2cmp_panel.cpp.

References m_Greyscale_Image.

Referenced by OnNegativeClicked(), and OpenProjectFiles().

◆ OnExportToClipboard()

void BITMAP2CMP_PANEL::OnExportToClipboard ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from BITMAP2CMP_PANEL_BASE.

Definition at line 485 of file bitmap2cmp_panel.cpp.

References _, ExportToBuffer(), getOutputFormat(), SYMBOL_FMT, and SYMBOL_PASTE_FMT.

◆ OnExportToFile()

◆ OnFormatChange()

void BITMAP2CMP_PANEL::OnFormatChange ( wxCommandEvent &  event)
overrideprivatevirtual

◆ OnLoadFile()

void BITMAP2CMP_PANEL::OnLoadFile ( wxCommandEvent &  event)
overridevirtual

Reimplemented from BITMAP2CMP_PANEL_BASE.

Definition at line 167 of file bitmap2cmp_panel.cpp.

References m_parentFrame, and BITMAP2CMP_FRAME::OnLoadFile().

◆ OnNegativeClicked()

void BITMAP2CMP_PANEL::OnNegativeClicked ( wxCommandEvent &  event)
overrideprivatevirtual

◆ OnPaintBW()

void BITMAP2CMP_PANEL::OnPaintBW ( wxPaintEvent &  event)
overrideprivatevirtual

Reimplemented from BITMAP2CMP_PANEL_BASE.

Definition at line 149 of file bitmap2cmp_panel.cpp.

References m_BN_Bitmap, and BITMAP2CMP_PANEL_BASE::m_BNPicturePanel.

◆ OnPaintGreyscale()

void BITMAP2CMP_PANEL::OnPaintGreyscale ( wxPaintEvent &  event)
overrideprivatevirtual

◆ OnPaintInit()

void BITMAP2CMP_PANEL::OnPaintInit ( wxPaintEvent &  event)
overrideprivatevirtual

Reimplemented from BITMAP2CMP_PANEL_BASE.

Definition at line 111 of file bitmap2cmp_panel.cpp.

References BITMAP2CMP_PANEL_BASE::m_InitialPicturePanel, and m_Pict_Bitmap.

◆ OnSizeChangeX()

◆ OnSizeChangeY()

◆ OnSizeUnitChange()

void BITMAP2CMP_PANEL::OnSizeUnitChange ( wxCommandEvent &  event)
overrideprivatevirtual

◆ OnThresholdChange()

void BITMAP2CMP_PANEL::OnThresholdChange ( wxScrollEvent &  event)
overrideprivatevirtual

Reimplemented from BITMAP2CMP_PANEL_BASE.

Definition at line 452 of file bitmap2cmp_panel.cpp.

References binarize(), BITMAP2CMP_PANEL_BASE::m_sliderThreshold, and Refresh().

◆ OpenProjectFiles()

◆ SaveSettings()

◆ SetOutputSize()

◆ ToggleAspectRatioLock()

void BITMAP2CMP_PANEL::ToggleAspectRatioLock ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from BITMAP2CMP_PANEL_BASE.

Definition at line 386 of file bitmap2cmp_panel.cpp.

References dummy, BITMAP2CMP_PANEL_BASE::m_aspectRatioCheckbox, and OnSizeChangeX().

◆ updateImageInfo()

Member Data Documentation

◆ m_aspectRatio

double BITMAP2CMP_PANEL::m_aspectRatio
private

Definition at line 135 of file bitmap2cmp_panel.h.

Referenced by LoadSettings(), OnSizeChangeX(), OnSizeChangeY(), and OpenProjectFiles().

◆ m_aspectRatioCheckbox

wxCheckBox* BITMAP2CMP_PANEL_BASE::m_aspectRatioCheckbox
protectedinherited

◆ m_BN_Bitmap

wxBitmap BITMAP2CMP_PANEL::m_BN_Bitmap
private

Definition at line 131 of file bitmap2cmp_panel.h.

Referenced by binarize(), and OnPaintBW().

◆ m_BNPicturePanel

wxScrolledWindow* BITMAP2CMP_PANEL_BASE::m_BNPicturePanel
protectedinherited

◆ m_BPPunits

wxStaticText* BITMAP2CMP_PANEL_BASE::m_BPPunits
protectedinherited

◆ m_BPPValue

wxStaticText* BITMAP2CMP_PANEL_BASE::m_BPPValue
protectedinherited

◆ m_buttonExportClipboard

wxButton* BITMAP2CMP_PANEL_BASE::m_buttonExportClipboard
protectedinherited

◆ m_buttonExportFile

wxButton* BITMAP2CMP_PANEL_BASE::m_buttonExportFile
protectedinherited

◆ m_buttonLoad

wxButton* BITMAP2CMP_PANEL_BASE::m_buttonLoad
protectedinherited

◆ m_checkNegative

wxCheckBox* BITMAP2CMP_PANEL_BASE::m_checkNegative
protectedinherited

◆ m_DPIUnit

wxStaticText* BITMAP2CMP_PANEL_BASE::m_DPIUnit
protectedinherited

◆ m_Greyscale_Bitmap

wxBitmap BITMAP2CMP_PANEL::m_Greyscale_Bitmap
private

Definition at line 129 of file bitmap2cmp_panel.h.

Referenced by OnNegativeClicked(), OnPaintGreyscale(), and OpenProjectFiles().

◆ m_Greyscale_Image

wxImage BITMAP2CMP_PANEL::m_Greyscale_Image
private

◆ m_GreyscalePicturePanel

wxScrolledWindow* BITMAP2CMP_PANEL_BASE::m_GreyscalePicturePanel
protectedinherited

◆ m_InitialPicturePanel

wxScrolledWindow* BITMAP2CMP_PANEL_BASE::m_InitialPicturePanel
protectedinherited

◆ m_InputXValueDPI

wxStaticText* BITMAP2CMP_PANEL_BASE::m_InputXValueDPI
protectedinherited

◆ m_InputYValueDPI

wxStaticText* BITMAP2CMP_PANEL_BASE::m_InputYValueDPI
protectedinherited

◆ m_layerCtrl

wxChoice* BITMAP2CMP_PANEL_BASE::m_layerCtrl
protectedinherited

◆ m_layerLabel

wxStaticText* BITMAP2CMP_PANEL_BASE::m_layerLabel
protectedinherited

◆ m_NB_Image

wxImage BITMAP2CMP_PANEL::m_NB_Image
private

Definition at line 130 of file bitmap2cmp_panel.h.

Referenced by binarize(), ExportToBuffer(), and OpenProjectFiles().

◆ m_negative

bool BITMAP2CMP_PANEL::m_negative
private

Definition at line 134 of file bitmap2cmp_panel.h.

Referenced by LoadSettings(), OnNegativeClicked(), and OpenProjectFiles().

◆ m_Notebook

wxNotebook* BITMAP2CMP_PANEL_BASE::m_Notebook
protectedinherited

◆ m_outputSizeX

◆ m_outputSizeY

◆ m_parentFrame

BITMAP2CMP_FRAME* BITMAP2CMP_PANEL::m_parentFrame
private

Definition at line 124 of file bitmap2cmp_panel.h.

Referenced by OnExportToFile(), and OnLoadFile().

◆ m_Pict_Bitmap

wxBitmap BITMAP2CMP_PANEL::m_Pict_Bitmap
private

Definition at line 127 of file bitmap2cmp_panel.h.

Referenced by OnPaintInit(), OpenProjectFiles(), and updateImageInfo().

◆ m_Pict_Image

wxImage BITMAP2CMP_PANEL::m_Pict_Image
private

Definition at line 126 of file bitmap2cmp_panel.h.

Referenced by OpenProjectFiles().

◆ m_PixelUnit

wxChoice* BITMAP2CMP_PANEL_BASE::m_PixelUnit
protectedinherited

◆ m_rbFootprint

wxRadioButton* BITMAP2CMP_PANEL_BASE::m_rbFootprint
protectedinherited

◆ m_rbPostscript

wxRadioButton* BITMAP2CMP_PANEL_BASE::m_rbPostscript
protectedinherited

◆ m_rbSymbol

wxRadioButton* BITMAP2CMP_PANEL_BASE::m_rbSymbol
protectedinherited

◆ m_rbWorksheet

wxRadioButton* BITMAP2CMP_PANEL_BASE::m_rbWorksheet
protectedinherited

◆ m_sizeLabel

wxStaticText* BITMAP2CMP_PANEL_BASE::m_sizeLabel
privateinherited

◆ m_SizePixUnits

wxStaticText* BITMAP2CMP_PANEL_BASE::m_SizePixUnits
protectedinherited

◆ m_SizeXValue

wxStaticText* BITMAP2CMP_PANEL_BASE::m_SizeXValue
protectedinherited

◆ m_SizeYValue

wxStaticText* BITMAP2CMP_PANEL_BASE::m_SizeYValue
protectedinherited

◆ m_sliderThreshold

◆ m_staticTextBPP

wxStaticText* BITMAP2CMP_PANEL_BASE::m_staticTextBPP
protectedinherited

◆ m_staticTextDPI

wxStaticText* BITMAP2CMP_PANEL_BASE::m_staticTextDPI
protectedinherited

◆ m_staticTextISize

wxStaticText* BITMAP2CMP_PANEL_BASE::m_staticTextISize
protectedinherited

◆ m_ThresholdText

wxStaticText* BITMAP2CMP_PANEL_BASE::m_ThresholdText
protectedinherited

◆ m_UnitSizeX

◆ m_UnitSizeY


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