Main Page | Modules | Class List | File List | Class Members | File Members

# Painting

## Functions
HANDLE | CxImage::CopyToHandle ()
bool | CxImage::CreateFromHANDLE (HANDLE hMem)
bool | CxImage::CreateFromHBITMAP (HBITMAP hbmp, HPALETTE hpal=0)
bool | CxImage::CreateFromHICON (HICON hico)
long | CxImage::Draw (HDC hdc, const RECT &rect, RECT *pClipRect=NULL, bool bSmooth=false)
long | CxImage::Draw (HDC hdc, long x=0, long y=0, long cx=-1, long cy=-1, RECT *pClipRect=0, bool bSmooth=false)
long | CxImage::Draw2 (HDC hdc, const RECT &rect)
long | CxImage::Draw2 (HDC hdc, long x=0, long y=0, long cx=-1, long cy=-1)
long | CxImage::DrawString (HDC hdc, long x, long y, const TCHAR *text, RGBQUAD color, const TCHAR *font, long lSize=0, long lWeight=400, BYTE bItalic=0, BYTE bUnderline=0, bool bSetAlpha=false)
long | CxImage::DrawStringEx (HDC hdc, long x, long y, CXTEXTINFO *pTextType, bool bSetAlpha=false)
void | CxImage::InitTextInfo (CXTEXTINFO *txt)
HBITMAP | CxImage::MakeBitmap (HDC hdc=NULL)
long | CxImage::Stretch (HDC hdc, const RECT &rect, DWORD dwRop=SRCCOPY)
long | CxImage::Stretch (HDC hdc, long xoffset, long yoffset, long xsize, long ysize, DWORD dwRop=SRCCOPY)
long | CxImage::Tile (HDC hdc, RECT *rc)

## Function Documentation

HANDLE CxImage::CopyToHandle | ( |  | ) | `[inherited]`

| Transfer the image in a global bitmap handle (clipboard copy)

bool CxImage::CreateFromHANDLE | ( | HANDLE | hMem | ) | `[inherited]`

  | Global object (clipboard paste) constructor Parameters:
  | hMem: | source bitmap object, the clipboard format must be CF_DIB
Returns: true if everything is ok

bool CxImage::CreateFromHBITMAP | ( | HBITMAP | hbmp,
|  | HPALETTE | hpal = `0`
| ) | `[inherited]`

  | Bitmap resource constructor Parameters:
  | hbmp | : bitmap resource handle
  | hpal | : (optional) palette, useful for 8bpp DC
Returns: true if everything is ok

bool CxImage::CreateFromHICON | ( | HICON | hico | ) | `[inherited]`

  | icon resource constructor Parameters:
  | hico | : icon resource handle
Returns: true if everything is ok

long CxImage::Draw | ( | HDC | hdc,
|  | const RECT & | rect,
|  | RECT * | pClipRect = `NULL`,
|  | bool | bSmooth = `false`
| ) | `[inherited]`

long CxImage::Draw | ( | HDC | hdc,
|  | long | x = `0`,
|  | long | y = `0`,
|  | long | cx = `-1`,
|  | long | cy = `-1`,
|  | RECT * | pClipRect = `0`,
|  | bool | bSmooth = `false`
| ) | `[inherited]`

  | Draws the image in the specified device context, with support for alpha channel, alpha palette, transparency, opacity. Parameters:
  | hdc | : destination device context
  | x,y | : (optional) offset
  | cx,cy | : (optional) size. If cx or cy are not specified (or less than 0), the normal width or height will be used If cx or cy are different than width or height, the image will be stretched
  | pClipRect | : limit the drawing operations inside a given rectangle in the output device context.
  | bSmooth | : activates a bilinear filter that will enhance the appearence for zommed pictures. Quite slow. Needs CXIMAGE_SUPPORT_INTERPOLATION.
Returns: true if everything is ok

long CxImage::Draw2 | ( | HDC | hdc,
|  | const RECT & | rect
| ) | `[inherited]`

long CxImage::Draw2 | ( | HDC | hdc,
|  | long | x = `0`,
|  | long | y = `0`,
|  | long | cx = `-1`,
|  | long | cy = `-1`
| ) | `[inherited]`

  | Draws (stretch) the image with single transparency support Parameters:
  | hdc | : destination device context
  | x,y | : (optional) offset
  | cx,cy | : (optional) size. If cx or cy are not specified (or less than 0), the normal width or height will be used If cx or cy are different than width or height, the image will be stretched
Returns: true if everything is ok

long CxImage::DrawString | ( | HDC | hdc,
|  | long | x,
|  | long | y,
|  | const TCHAR * | text,
|  | RGBQUAD | color,
|  | const TCHAR * | font,
|  | long | lSize = `0`,
|  | long | lWeight = `400`,
|  | BYTE | bItalic = `0`,
|  | BYTE | bUnderline = `0`,
|  | bool | bSetAlpha = `false`
| ) | `[inherited]`

long CxImage::DrawStringEx | ( | HDC | hdc,
|  | long | x,
|  | long | y,
|  | CXTEXTINFO * | pTextType,
|  | bool | bSetAlpha = `false`
| ) | `[inherited]`

void CxImage::InitTextInfo | ( | CXTEXTINFO * | txt | ) | `[inherited]`

HBITMAP CxImage::MakeBitmap | ( | HDC | hdc = `NULL` | ) | `[inherited]`

  | Transfer the image in a bitmap handle Parameters:
  | hdc: | target device context (the screen, usually)
Returns: bitmap handle, or NULL if an error occurs.

long CxImage::Stretch | ( | HDC | hdc,
|  | const RECT & | rect,
|  | DWORD | dwRop = `SRCCOPY`
| ) | `[inherited]`

long CxImage::Stretch | ( | HDC | hdc,
|  | long | xoffset,
|  | long | yoffset,
|  | long | xsize,
|  | long | ysize,
|  | DWORD | dwRop = `SRCCOPY`
| ) | `[inherited]`

  | Stretch the image. Obsolete: use Draw() or Draw2() Parameters:
  | hdc | : destination device context
  | xoffset,yoffset | : (optional) offset
  | xsize,ysize | : size.
  | dwRop | : raster operation code (see BitBlt documentation)
Returns: true if everything is ok

long CxImage::Tile | ( | HDC | hdc,
|  | RECT * | rc
| ) | `[inherited]`

  | Tiles the device context in the specified rectangle with the image. Parameters:
  | hdc | : destination device context
  | rc | : tiled rectangle in the output device context
Returns: true if everything is ok