LibreOffice Module vcl (master)  1
Public Member Functions | Private Attributes | List of all members
OpenGLCompatibleDC Class Reference

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

#include <salgdi.h>

Collaboration diagram for OpenGLCompatibleDC:
[legend]

Public Member Functions

 OpenGLCompatibleDC (SalGraphics &rGraphics, int x, int y, int width, int height)
 
 ~OpenGLCompatibleDC ()
 
HDC getCompatibleHDC ()
 
SalTwoRect getTwoRect ()
 
Size getBitmapSize ()
 
void fill (sal_uInt32 color)
 Reset the DC with the defined color. More...
 
OpenGLTexturegetTexture ()
 Obtain the texture; the caller must delete it after use. More...
 
bool copyToTexture (OpenGLTexture &aTexture)
 Copy bitmap data to the texture. Texture must be initialized and the correct size to hold the bitmap. More...
 

Private 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...
 
WinOpenGLSalGraphicsImplmpImpl
 The OpenGL-based 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 as a texture for OpenGL drawing.

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

Constructor & Destructor Documentation

OpenGLCompatibleDC::OpenGLCompatibleDC ( SalGraphics rGraphics,
int  x,
int  y,
int  width,
int  height 
)
OpenGLCompatibleDC::~OpenGLCompatibleDC ( )

Member Function Documentation

bool OpenGLCompatibleDC::copyToTexture ( OpenGLTexture aTexture)

Copy bitmap data to the texture. Texture must be initialized and the correct size to hold the bitmap.

void OpenGLCompatibleDC::fill ( sal_uInt32  color)

Reset the DC with the defined color.

Size OpenGLCompatibleDC::getBitmapSize ( )
inline

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

References SalTwoRect::mnSrcHeight, and SalTwoRect::mnSrcWidth.

HDC OpenGLCompatibleDC::getCompatibleHDC ( )
inline

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

References mhCompatibleDC.

OpenGLTexture* OpenGLCompatibleDC::getTexture ( )

Obtain the texture; the caller must delete it after use.

SalTwoRect OpenGLCompatibleDC::getTwoRect ( )
inline

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

References maRects.

Member Data Documentation

SalTwoRect OpenGLCompatibleDC::maRects
private

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 OpenGLCompatibleDC::mhBitmap
private

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

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

HDC OpenGLCompatibleDC::mhCompatibleDC
private

The compatible DC that we create for our purposes.

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

Referenced by getCompatibleHDC().

HBITMAP OpenGLCompatibleDC::mhOrigBitmap
private

Return the previous bitmap to undo the SelectObject.

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

sal_uInt32* OpenGLCompatibleDC::mpData
private

DIBSection data.

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

WinOpenGLSalGraphicsImpl* OpenGLCompatibleDC::mpImpl
private

The OpenGL-based 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: