KiCad PCB EDA Suite
dialog_color_picker.cpp File Reference
#include <dialogs/dialog_color_picker.h>
#include <cmath>
#include <algorithm>
#include <kiface_base.h>
#include <settings/app_settings.h>
#include <widgets/color_swatch.h>
#include <wx/bitmap.h>
#include <wx/dcmemory.h>

Go to the source code of this file.

Macros

#define ALPHA_MAX   100
 
#define ID_COLOR_BLACK   2000
 
#define MAPX(xx)   bmsize.x / 2 + ( xx )
 
#define MAPY(yy)   bmsize.y / 2 - ( yy )
 
#define SLOPE_AXIS   50.0
 
#define MAPX(xx)   bmsize.x / 2 + ( xx )
 
#define MAPY(yy)   bmsize.y / 2 - ( yy )
 
#define SLOPE_AXIS   50.0
 

Functions

void configureSpinCtrl (wxSpinCtrl *aCtrl)
 

Macro Definition Documentation

◆ ALPHA_MAX

#define ALPHA_MAX   100

Definition at line 30 of file dialog_color_picker.cpp.

◆ ID_COLOR_BLACK

#define ID_COLOR_BLACK   2000

◆ MAPX [1/2]

#define MAPX (   xx)    bmsize.x / 2 + ( xx )

◆ MAPX [2/2]

#define MAPX (   xx)    bmsize.x / 2 + ( xx )

◆ MAPY [1/2]

#define MAPY (   yy)    bmsize.y / 2 - ( yy )

◆ MAPY [2/2]

#define MAPY (   yy)    bmsize.y / 2 - ( yy )

◆ SLOPE_AXIS [1/2]

#define SLOPE_AXIS   50.0

◆ SLOPE_AXIS [2/2]

#define SLOPE_AXIS   50.0

Function Documentation

◆ configureSpinCtrl()

void configureSpinCtrl ( wxSpinCtrl *  aCtrl)

Definition at line 35 of file dialog_color_picker.cpp.

36 {
37  wxSize textLength = aCtrl->GetTextExtent( "999" );
38  wxSize ctrlSize = aCtrl->GetSizeFromTextSize( textLength );
39 
40  aCtrl->SetMinSize( ctrlSize );
41  aCtrl->SetSize( ctrlSize );
42 }

Referenced by DIALOG_COLOR_PICKER::TransferDataToWindow().