KiCad PCB EDA Suite
EDA_BLIT_NORMALIZER Class Reference

Class EDA_BLIT_NORMALIZER is a helper class for clearing a device context scale and offset parameters before performing a Blit operation. More...

#include <kicad_device_context.h>

Public Member Functions

 EDA_BLIT_NORMALIZER (wxDC *aDC)
 
 ~EDA_BLIT_NORMALIZER ()
 

Private Attributes

wxDC * m_dc
 
double m_userScaleX
 
double m_userScaleY
 
int m_logicalOriginX
 
int m_logicalOriginY
 
int m_deviceOriginX
 
int m_deviceOriginY
 

Detailed Description

Class EDA_BLIT_NORMALIZER is a helper class for clearing a device context scale and offset parameters before performing a Blit operation.

This class keeps a temporary copy of the scale and offset parameters of a device context and then restores them when it goes out of scope.

Definition at line 97 of file kicad_device_context.h.

Constructor & Destructor Documentation

EDA_BLIT_NORMALIZER::EDA_BLIT_NORMALIZER ( wxDC *  aDC)
inline

Definition at line 100 of file kicad_device_context.h.

References m_deviceOriginX, m_deviceOriginY, m_logicalOriginX, m_logicalOriginY, m_userScaleX, and m_userScaleY.

101  : m_dc( aDC )
102  {
103  if( aDC )
104  {
105  aDC->GetUserScale( &m_userScaleX, &m_userScaleY );
106  aDC->GetLogicalOrigin( &m_logicalOriginX, &m_logicalOriginY );
107  aDC->GetDeviceOrigin( &m_deviceOriginX, &m_deviceOriginY );
108  aDC->SetUserScale( 1.0, 1.0 );
109  aDC->SetLogicalOrigin( 0, 0 );
110  aDC->SetDeviceOrigin( 0, 0 );
111  }
112  }
EDA_BLIT_NORMALIZER::~EDA_BLIT_NORMALIZER ( )
inline

Member Data Documentation

wxDC* EDA_BLIT_NORMALIZER::m_dc
private

Definition at line 125 of file kicad_device_context.h.

Referenced by ~EDA_BLIT_NORMALIZER().

int EDA_BLIT_NORMALIZER::m_deviceOriginX
private

Definition at line 130 of file kicad_device_context.h.

Referenced by EDA_BLIT_NORMALIZER(), and ~EDA_BLIT_NORMALIZER().

int EDA_BLIT_NORMALIZER::m_deviceOriginY
private

Definition at line 131 of file kicad_device_context.h.

Referenced by EDA_BLIT_NORMALIZER(), and ~EDA_BLIT_NORMALIZER().

int EDA_BLIT_NORMALIZER::m_logicalOriginX
private

Definition at line 128 of file kicad_device_context.h.

Referenced by EDA_BLIT_NORMALIZER(), and ~EDA_BLIT_NORMALIZER().

int EDA_BLIT_NORMALIZER::m_logicalOriginY
private

Definition at line 129 of file kicad_device_context.h.

Referenced by EDA_BLIT_NORMALIZER(), and ~EDA_BLIT_NORMALIZER().

double EDA_BLIT_NORMALIZER::m_userScaleX
private

Definition at line 126 of file kicad_device_context.h.

Referenced by EDA_BLIT_NORMALIZER(), and ~EDA_BLIT_NORMALIZER().

double EDA_BLIT_NORMALIZER::m_userScaleY
private

Definition at line 127 of file kicad_device_context.h.

Referenced by EDA_BLIT_NORMALIZER(), and ~EDA_BLIT_NORMALIZER().


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