KiCad PCB EDA Suite
BUFFERED_DC_HELPER Class Reference

Class BUFFERED_DC_HELPER fixes a bug on Windows when using buffered device context. More...

#include <kicad_device_context.h>

Public Member Functions

 BUFFERED_DC_HELPER (wxBufferedDC *aDC)
 
virtual ~BUFFERED_DC_HELPER ()
 

Private Attributes

wxBufferedDC * m_dc
 

Detailed Description

Class BUFFERED_DC_HELPER fixes a bug on Windows when using buffered device context.

When using buffered device context drawing in Windows, the user scaling must be set to 1 and the logical offset must be set to zero before the bitmap blit operation occurs in the destructor of wxBufferdDC but after the normal drawing takes place.

Definition at line 68 of file kicad_device_context.h.

Constructor & Destructor Documentation

BUFFERED_DC_HELPER::BUFFERED_DC_HELPER ( wxBufferedDC *  aDC)
inline

Definition at line 71 of file kicad_device_context.h.

72  : m_dc( aDC ) {}
virtual BUFFERED_DC_HELPER::~BUFFERED_DC_HELPER ( )
inlinevirtual

Definition at line 74 of file kicad_device_context.h.

References m_dc.

75  {
76  if( m_dc )
77  {
78  m_dc->SetLogicalOrigin( 0, 0 );
79  m_dc->SetUserScale( 1.0, 1.0 );
80  }
81  }

Member Data Documentation

wxBufferedDC* BUFFERED_DC_HELPER::m_dc
private

Definition at line 84 of file kicad_device_context.h.

Referenced by ~BUFFERED_DC_HELPER().


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