LibreOffice Module vcl (master) 1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CompatibleDC Class Reference

Class that creates (and destroys) a compatible Device Context. More...

#include <salgdi.h>

Inheritance diagram for CompatibleDC:
[legend]
Collaboration diagram for CompatibleDC:
[legend]

Public Member Functions

virtual ~CompatibleDC ()
 
HDC getCompatibleHDC ()
 
SalTwoRect getTwoRect () const
 
tools::Long getBitmapWidth () const
 
tools::Long getBitmapHeight () const
 
void fill (sal_uInt32 color)
 Reset the DC with the defined color. More...
 

Static Public Member Functions

static std::unique_ptr< CompatibleDCcreate (SalGraphics &rGraphics, int x, int y, int width, int height)
 

Protected Member Functions

 CompatibleDC (SalGraphics &rGraphics, int x, int y, int width, int height, bool disable=true)
 

Protected Attributes

HDC mhCompatibleDC
 The compatible DC that we create for our purposes. More...
 
HBITMAP mhBitmap
 DIBSection that we use for the GDI drawing, and later obtain. More...
 
HBITMAP mhOrigBitmap
 Return the previous bitmap to undo the SelectObject. More...
 
sal_uInt32 * mpData
 DIBSection data. More...
 
SalTwoRect maRects
 Mapping between the GDI position and OpenGL, to use for OpenGL drawing. More...
 
WinSalGraphicsImplBasempImpl
 The SalGraphicsImpl where we will draw. If null, we ignore the drawing, it means it happened directly to the DC... More...
 

Detailed Description

Class that creates (and destroys) a compatible Device Context.

This is to be used for GDI drawing into a DIB that we later use for a different drawing method, such as a texture for OpenGL drawing or surface for Skia drawing.

Definition at line 93 of file win/salgdi.h.

Constructor & Destructor Documentation

◆ CompatibleDC()

CompatibleDC::CompatibleDC ( SalGraphics rGraphics,
int  x,
int  y,
int  width,
int  height,
bool  disable = true 
)
protected

◆ ~CompatibleDC()

virtual CompatibleDC::~CompatibleDC ( )
virtual

Member Function Documentation

◆ create()

static std::unique_ptr< CompatibleDC > CompatibleDC::create ( SalGraphics rGraphics,
int  x,
int  y,
int  width,
int  height 
)
static

◆ fill()

void CompatibleDC::fill ( sal_uInt32  color)

Reset the DC with the defined color.

◆ getBitmapHeight()

tools::Long CompatibleDC::getBitmapHeight ( ) const
inline

Definition at line 127 of file win/salgdi.h.

References maRects, and SalTwoRect::mnSrcHeight.

◆ getBitmapWidth()

tools::Long CompatibleDC::getBitmapWidth ( ) const
inline

Definition at line 126 of file win/salgdi.h.

References maRects, and SalTwoRect::mnSrcWidth.

◆ getCompatibleHDC()

HDC CompatibleDC::getCompatibleHDC ( )
inline

Definition at line 122 of file win/salgdi.h.

References mhCompatibleDC.

◆ getTwoRect()

SalTwoRect CompatibleDC::getTwoRect ( ) const
inline

Definition at line 124 of file win/salgdi.h.

References maRects.

Member Data Documentation

◆ maRects

SalTwoRect CompatibleDC::maRects
protected

Mapping between the GDI position and OpenGL, to use for OpenGL drawing.

Definition at line 109 of file win/salgdi.h.

Referenced by getBitmapHeight(), getBitmapWidth(), and getTwoRect().

◆ mhBitmap

HBITMAP CompatibleDC::mhBitmap
protected

DIBSection that we use for the GDI drawing, and later obtain.

Definition at line 100 of file win/salgdi.h.

◆ mhCompatibleDC

HDC CompatibleDC::mhCompatibleDC
protected

The compatible DC that we create for our purposes.

Definition at line 97 of file win/salgdi.h.

Referenced by getCompatibleHDC().

◆ mhOrigBitmap

HBITMAP CompatibleDC::mhOrigBitmap
protected

Return the previous bitmap to undo the SelectObject.

Definition at line 103 of file win/salgdi.h.

◆ mpData

sal_uInt32* CompatibleDC::mpData
protected

DIBSection data.

Definition at line 106 of file win/salgdi.h.

◆ mpImpl

WinSalGraphicsImplBase* CompatibleDC::mpImpl
protected

The SalGraphicsImpl where we will draw. If null, we ignore the drawing, it means it happened directly to the DC...

Definition at line 112 of file win/salgdi.h.


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