KiCad PCB EDA Suite
Loading...
Searching...
No Matches
KIGFX::CAIRO_PRINT_CTX Class Reference

Provide a Cairo context created from wxPrintDC. More...

#include <cairo_print.h>

Inheritance diagram for KIGFX::CAIRO_PRINT_CTX:
KIGFX::PRINT_CONTEXT

Public Member Functions

 CAIRO_PRINT_CTX (wxDC *aDC)
 
 ~CAIRO_PRINT_CTX ()
 
cairo_t * GetContext () const
 
cairo_surface_t * GetSurface () const
 
double GetNativeDPI () const override
 
bool HasNativeLandscapeRotation () const override
 

Private Attributes

wxGCDC * m_gcdc
 
cairo_t * m_ctx
 
cairo_surface_t * m_surface
 
double m_dpi
 

Detailed Description

Provide a Cairo context created from wxPrintDC.

It allows one to prepare printouts using the Cairo library and let wxWidgets handle the rest.

Definition at line 38 of file cairo_print.h.

Constructor & Destructor Documentation

◆ CAIRO_PRINT_CTX()

CAIRO_PRINT_CTX::CAIRO_PRINT_CTX ( wxDC *  aDC)

Definition at line 52 of file cairo_print.cpp.

References DEFAULT_DPI, m_ctx, m_dpi, m_gcdc, and m_surface.

◆ ~CAIRO_PRINT_CTX()

CAIRO_PRINT_CTX::~CAIRO_PRINT_CTX ( )

Definition at line 121 of file cairo_print.cpp.

References m_ctx, m_gcdc, and m_surface.

Member Function Documentation

◆ GetContext()

cairo_t * KIGFX::CAIRO_PRINT_CTX::GetContext ( ) const
inline

Definition at line 44 of file cairo_print.h.

References m_ctx.

◆ GetNativeDPI()

double KIGFX::CAIRO_PRINT_CTX::GetNativeDPI ( ) const
inlineoverridevirtual

Implements KIGFX::PRINT_CONTEXT.

Definition at line 54 of file cairo_print.h.

References m_dpi.

◆ GetSurface()

cairo_surface_t * KIGFX::CAIRO_PRINT_CTX::GetSurface ( ) const
inline

Definition at line 49 of file cairo_print.h.

References m_surface.

◆ HasNativeLandscapeRotation()

bool KIGFX::CAIRO_PRINT_CTX::HasNativeLandscapeRotation ( ) const
inlineoverridevirtual

Implements KIGFX::PRINT_CONTEXT.

Definition at line 59 of file cairo_print.h.

Member Data Documentation

◆ m_ctx

cairo_t* KIGFX::CAIRO_PRINT_CTX::m_ctx
private

Definition at line 70 of file cairo_print.h.

Referenced by CAIRO_PRINT_CTX(), GetContext(), and ~CAIRO_PRINT_CTX().

◆ m_dpi

double KIGFX::CAIRO_PRINT_CTX::m_dpi
private

Definition at line 78 of file cairo_print.h.

Referenced by CAIRO_PRINT_CTX(), and GetNativeDPI().

◆ m_gcdc

wxGCDC* KIGFX::CAIRO_PRINT_CTX::m_gcdc
private

Definition at line 69 of file cairo_print.h.

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

◆ m_surface

cairo_surface_t* KIGFX::CAIRO_PRINT_CTX::m_surface
private

Definition at line 71 of file cairo_print.h.

Referenced by CAIRO_PRINT_CTX(), GetSurface(), and ~CAIRO_PRINT_CTX().


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