MFC Grid manual

CMsImg32 Class Reference

Helper class to perform image and color manipulations. More...

#include <Dapfor/GUI/MsImg32.h>

List of all members.


Static Public Member Functions

static COLORREF AlphaBlend (COLORREF sourceColor, COLORREF colorAlpha, unsigned char alpha)
 Blends two colors with a transparency coefficient.
static bool AlphaBlend (CDC &dc, const CRect &rect, COLORREF color, BYTE alpha)
 Displays bitmaps with transparent or semitransparent pixels.
static bool Load32BitImage (CImageList &imageList, UINT resourceId, bool useMask, COLORREF maskColor)
 Helps to load 32-bit color image from resources.
static bool IsAvailable ()
 Indicates that alpha-blend & gradient services are available.
static BOOL GradientFill (HDC hdc, PTRIVERTEX pVertex, ULONG dwNumVertex, PVOID pMesh, ULONG dwNumMesh, ULONG dwMode)
 Fills rectangle and triangle structures.
static BOOL AlphaBlend (HDC hdcDest, int nXOriginDest, int nYOriginDest, int nWidthDest, int nHeightDest, HDC hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, BLENDFUNCTION blendFunction)
 Displays the bitmaps that have transparent or semitransparent pixels.
static BOOL TransparentBlt (HDC hdcDest, int xDest, int yDest, int nDestWidth, int nDestHeight, HDC hdcSrc, int xSrc, int ySrc, int nSrcWidth, int nSrcHeight, UINT clrTransparent)
 Performs a bit-block transfer of the color data corresponding to a rectangle of pixels from a specified source device context into a destination device context.

Detailed Description

Helper class to perform image and color manipulations.

Version:
1.0.0.0 Initial version

Member Function Documentation

COLORREF AlphaBlend ( COLORREF  sourceColor,
COLORREF  colorAlpha,
unsigned char  alpha 
) [static]

Blends two colors with a transparency coefficient.

Parameters:
[in] sourceColor Specifies the source color
[in] colorAlpha Specifies the second color
[in] alpha Transparency coefficient
Returns:
Color after blending

bool AlphaBlend ( CDC &  dc,
const CRect &  rect,
COLORREF  color,
BYTE  alpha 
) [static]

Displays bitmaps with transparent or semitransparent pixels.

Parameters:
[in] dc handle to DC
[in] rect Rectangle in DC to merge with a specified color
[in] color Color with which the image is merged
[in] alpha Transparency coefficient
Returns:
True if the image has been successfully merged with the specified color. Otherwise false.

bool Load32BitImage ( CImageList &  imageList,
UINT  resourceId,
bool  useMask,
COLORREF  maskColor 
) [static]

Helps to load 32-bit color image from resources.

Parameters:
[in,out] imageList Images list to be loaded from resources
[in] resourceId Resource identifier
[in] useMask Value indicating that a color mask should be used
[in] maskColor The color mask
Returns:
True if the image list has been successfully loaded. Otherwise false.

bool IsAvailable (  )  [static]

Indicates that alpha-blend & gradient services are available.

Returns:
True if available. Otherwise - false.

BOOL GradientFill ( HDC  hdc,
PTRIVERTEX  pVertex,
ULONG  dwNumVertex,
PVOID  pMesh,
ULONG  dwNumMesh,
ULONG  dwMode 
) [static]

Fills rectangle and triangle structures.

Parameters:
hdc  handle to DC
pVertex  array of vertices
dwNumVertex  number of vertices
pMesh  array of gradients
dwNumMesh  size of gradient array
dwMode  gradient fill mode

BOOL AlphaBlend ( HDC  hdcDest,
int  nXOriginDest,
int  nYOriginDest,
int  nWidthDest,
int  nHeightDest,
HDC  hdcSrc,
int  nXOriginSrc,
int  nYOriginSrc,
int  nWidthSrc,
int  nHeightSrc,
BLENDFUNCTION  blendFunction 
) [static]

Displays the bitmaps that have transparent or semitransparent pixels.

Parameters:
hdcDest  handle to destination DC
nXOriginDest  x-coord of upper-left corner
nYOriginDest  y-coord of upper-left corner
nWidthDest  destination width
nHeightDest  destination height
hdcSrc  handle to source DC
nXOriginSrc  x-coord of upper-left corner
nYOriginSrc  y-coord of upper-left corner
nWidthSrc  source width
nHeightSrc  source height
blendFunction  alpha-blending function

BOOL TransparentBlt ( HDC  hdcDest,
int  xDest,
int  yDest,
int  nDestWidth,
int  nDestHeight,
HDC  hdcSrc,
int  xSrc,
int  ySrc,
int  nSrcWidth,
int  nSrcHeight,
UINT  clrTransparent 
) [static]

Performs a bit-block transfer of the color data corresponding to a rectangle of pixels from a specified source device context into a destination device context.

Parameters:
hdcDest  handle to destination DC
xDest  x-coord of destination upper-left corner
yDest  y-coord of destination upper-left corner
nDestWidth  width of destination rectangle
nDestHeight  height of destination rectangle
hdcSrc  handle to source DC
xSrc  x-coord of source upper-left corner
ySrc  y-coord of source upper-left corner
nSrcWidth  width of source rectangle
nSrcHeight  height of source rectangle