LibreOffice Module vcl (master)  1
Classes | 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]

Classes

struct  Texture
 

Public Member Functions

virtual ~CompatibleDC ()
 
HDC getCompatibleHDC ()
 
SalTwoRect getTwoRect () const
 
long getBitmapWidth () const
 
long getBitmapHeight () const
 
void fill (sal_uInt32 color)
 Reset the DC with the defined color. More...
 
virtual std::unique_ptr< TexturegetAsMaskTexture () const
 Obtain the texture in format for WinSalGraphicsImplBase::DrawTextMask(). More...
 
virtual bool wantsTextColorWhite () const
 Return true if text glyphs should be drawn as white instead of black. 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 100 of file win/salgdi.h.

Constructor & Destructor Documentation

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

Member Function Documentation

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

Reset the DC with the defined color.

virtual std::unique_ptr<Texture> CompatibleDC::getAsMaskTexture ( ) const
inlinevirtual

Obtain the texture in format for WinSalGraphicsImplBase::DrawTextMask().

Reimplemented in SkiaCompatibleDC, and OpenGLCompatibleDC.

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

long CompatibleDC::getBitmapHeight ( ) const
inline

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

References SalTwoRect::mnSrcHeight.

long CompatibleDC::getBitmapWidth ( ) const
inline

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

References SalTwoRect::mnSrcWidth.

HDC CompatibleDC::getCompatibleHDC ( )
inline

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

References mhCompatibleDC.

SalTwoRect CompatibleDC::getTwoRect ( ) const
inline

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

References maRects.

virtual bool CompatibleDC::wantsTextColorWhite ( ) const
inlinevirtual

Return true if text glyphs should be drawn as white instead of black.

Reimplemented in SkiaCompatibleDC.

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

Member Data Documentation

SalTwoRect CompatibleDC::maRects
protected

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

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

Referenced by getTwoRect().

HBITMAP CompatibleDC::mhBitmap
protected

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

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

HDC CompatibleDC::mhCompatibleDC
protected

The compatible DC that we create for our purposes.

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

Referenced by getCompatibleHDC().

HBITMAP CompatibleDC::mhOrigBitmap
protected

Return the previous bitmap to undo the SelectObject.

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

sal_uInt32* CompatibleDC::mpData
protected

DIBSection data.

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

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 119 of file win/salgdi.h.


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