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
 
wxCheckBox * m_aspectRatioCheckbox
 
wxStaticText * m_staticTextOSize
 
wxTextCtrl * m_UnitSizeX
 
wxTextCtrl * m_UnitSizeY
 
wxChoice * m_PixelUnit
 
wxStaticText * m_ThresholdText
 
wxSlider * m_sliderThreshold
 
wxCheckBox * m_checkNegative
 
wxStaticBoxSizer * m_sizerPcbLayer
 
wxChoice * m_chPCBLayer
 
wxRadioBox * m_rbOutputFormat
 
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
 
EDA_UNITS getUnitFromSelection ()
 
wxString FormatOutputSize (double aSize)
 
void Binarize (double aThreshold)
 
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
 
void NegateGreyscaleImage ()
 
void updateImageInfo ()
 
void OnFormatChange (wxCommandEvent &event) override
 
void exportBitmap (OUTPUT_FMT_ID aFormat)
 

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
 

Detailed Description

Definition at line 87 of file bitmap2cmp_panel.h.

Constructor & Destructor Documentation

◆ BITMAP2CMP_PANEL()

◆ ~BITMAP2CMP_PANEL()

BITMAP2CMP_PANEL::~BITMAP2CMP_PANEL ( )

Definition at line 66 of file bitmap2cmp_panel.cpp.

Member Function Documentation

◆ Binarize()

void BITMAP2CMP_PANEL::Binarize ( double  aThreshold)
private

◆ exportBitmap()

◆ 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 71 of file bitmap2cmp_panel.cpp.

References BITMAP2CMP_PANEL_BASE::m_Notebook.

Referenced by BITMAP2CMP_FRAME::GetToolCanvas().

◆ GetOutputSizeX()

IMAGE_SIZE BITMAP2CMP_PANEL::GetOutputSizeX ( ) const
inline

Definition at line 102 of file bitmap2cmp_panel.h.

References m_outputSizeX.

Referenced by BITMAP2CMP_FRAME::ShowChangedLanguage().

◆ GetOutputSizeY()

IMAGE_SIZE BITMAP2CMP_PANEL::GetOutputSizeY ( ) const
inline

Definition at line 103 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 442 of file bitmap2cmp_panel.cpp.

References m_Greyscale_Image.

Referenced by OnNegativeClicked(), and OpenProjectFiles().

◆ OnExportToClipboard()

void BITMAP2CMP_PANEL::OnExportToClipboard ( wxCommandEvent &  event)
overrideprivatevirtual
Returns
the EDA_UNITS from the m_PixelUnit choice

Reimplemented from BITMAP2CMP_PANEL_BASE.

Definition at line 491 of file bitmap2cmp_panel.cpp.

References _, ExportToBuffer(), and BITMAP2CMP_PANEL_BASE::m_rbOutputFormat.

◆ OnExportToFile()

void BITMAP2CMP_PANEL::OnExportToFile ( wxCommandEvent &  event)
overrideprivatevirtual

Reimplemented from BITMAP2CMP_PANEL_BASE.

Definition at line 482 of file bitmap2cmp_panel.cpp.

References exportBitmap(), and BITMAP2CMP_PANEL_BASE::m_rbOutputFormat.

◆ OnFormatChange()

void BITMAP2CMP_PANEL::OnFormatChange ( wxCommandEvent &  event)
overrideprivatevirtual

◆ OnLoadFile()

void BITMAP2CMP_PANEL::OnLoadFile ( wxCommandEvent &  event)
overridevirtual

Reimplemented from BITMAP2CMP_PANEL_BASE.

Definition at line 179 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 161 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 123 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 475 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 402 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 155 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 151 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_chPCBLayer

wxChoice* BITMAP2CMP_PANEL_BASE::m_chPCBLayer
protectedinherited

◆ m_DPIUnit

wxStaticText* BITMAP2CMP_PANEL_BASE::m_DPIUnit
protectedinherited

◆ m_Greyscale_Bitmap

wxBitmap BITMAP2CMP_PANEL::m_Greyscale_Bitmap
private

Definition at line 149 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_NB_Image

wxImage BITMAP2CMP_PANEL::m_NB_Image
private

Definition at line 150 of file bitmap2cmp_panel.h.

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

◆ m_negative

bool BITMAP2CMP_PANEL::m_negative
private

Definition at line 154 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 144 of file bitmap2cmp_panel.h.

Referenced by exportBitmap(), and OnLoadFile().

◆ m_Pict_Bitmap

wxBitmap BITMAP2CMP_PANEL::m_Pict_Bitmap
private

Definition at line 147 of file bitmap2cmp_panel.h.

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

◆ m_Pict_Image

wxImage BITMAP2CMP_PANEL::m_Pict_Image
private

Definition at line 146 of file bitmap2cmp_panel.h.

Referenced by OpenProjectFiles().

◆ m_PixelUnit

wxChoice* BITMAP2CMP_PANEL_BASE::m_PixelUnit
protectedinherited

◆ m_rbOutputFormat

wxRadioBox* BITMAP2CMP_PANEL_BASE::m_rbOutputFormat
protectedinherited

◆ m_SizePixUnits

wxStaticText* BITMAP2CMP_PANEL_BASE::m_SizePixUnits
protectedinherited

◆ m_sizerPcbLayer

wxStaticBoxSizer* BITMAP2CMP_PANEL_BASE::m_sizerPcbLayer
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_staticTextOSize

wxStaticText* BITMAP2CMP_PANEL_BASE::m_staticTextOSize
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: