DC attribute operations
[GDI functions]

Defines

Functions


Define Documentation

#define GetBkColor ( hdc   )     GetDCAttr (hdc, DC_ATTR_BK_COLOR)

Gets the background color of a DC.

Parameters:
hdc The device context.
Returns:
The background pixel value of the DC hdc.
See also:
GetDCAttr, SetBkColor

Definition at line 2079 of file gdi.h.

#define GetBkMode ( hdc   )     GetDCAttr (hdc, DC_ATTR_BK_MODE)

Gets the background mode of a DC.

Parameters:
hdc The device context.
Returns:
The background mode of the DC hdc.
Return values:
BM_TRANSPARENT Indicate that reserve the background untouched when drawing text.
BM_OPAQUE Indicate that erase the background with background color when drawing text.
See also:
GetDCAttr, SetBkMode

Definition at line 2096 of file gdi.h.

#define GetBrushColor ( hdc   )     GetDCAttr (hdc, DC_ATTR_BRUSH_COLOR)

Gets the brush color of a DC.

Parameters:
hdc The device context.
Returns:
The brush color (pixel value) of the DC hdc.
See also:
GetDCAttr, SetBrushColor

Definition at line 2118 of file gdi.h.

#define GetPenColor ( hdc   )     GetDCAttr (hdc, DC_ATTR_PEN_COLOR)

Gets the pen color of a DC.

Parameters:
hdc The device context.
Returns:
The pen color (pixel value) of the DC hdc.
See also:
GetDCAttr, SetPenColor

Definition at line 2107 of file gdi.h.

#define GetTabStop ( hdc   )     GetDCAttr (hdc, DC_ATTR_TAB_STOP)

Gets the tabstop value of a DC.

Parameters:
hdc The device context.
Returns:
The tabstop value of the DC hdc.
See also:
GetDCAttr, SetTabStop

Definition at line 2140 of file gdi.h.

#define GetTextColor ( hdc   )     GetDCAttr (hdc, DC_ATTR_TEXT_COLOR)

Gets the text color of a DC.

Parameters:
hdc The device context.
Returns:
The text color (pixel value) of the DC hdc.
See also:
GetDCAttr, SetTextColor

Definition at line 2129 of file gdi.h.

#define SetBkColor ( hdc,
color   )     SetDCAttr (hdc, DC_ATTR_BK_COLOR, (DWORD) color)

Sets the background color of a DC to a new value.

Parameters:
hdc The device context.
color The new background color (pixel value).
Returns:
The old background pixel value of the DC hdc.
See also:
SetDCAttr, GetBkColor

Definition at line 2152 of file gdi.h.

#define SetBkMode ( hdc,
mode   )     SetDCAttr (hdc, DC_ATTR_BK_MODE, (DWORD) mode)

Sets the background color of a DC to a new mode.

Parameters:
hdc The device context.
mode The new background mode, be can one of the following values:
  • BM_TRANSPARENT
    Indicate that reserve the background untouched when drawing text.
  • BM_OPAQUE
    Indicate that erase the background with background color when drawing text.
Returns:
The old background mode of the DC hdc.
See also:
SetDCAttr, GetBkMode

Definition at line 2172 of file gdi.h.

#define SetBrushColor ( hdc,
color   )     SetDCAttr (hdc, DC_ATTR_BRUSH_COLOR, (DWORD) color)

Sets the brush color of a DC to a new value.

Parameters:
hdc The device context.
color The new brush color (pixel value).
Returns:
The old brush pixel value of the DC hdc.
See also:
SetDCAttr, GetBrushColor

Definition at line 2198 of file gdi.h.

#define SetPenColor ( hdc,
color   )     SetDCAttr (hdc, DC_ATTR_PEN_COLOR, (DWORD) color)

Sets the pen color of a DC to a new value.

Parameters:
hdc The device context.
color The new pen color (pixel value).
Returns:
The old pen pixel value of the DC hdc.
See also:
SetDCAttr, GetPenColor

Definition at line 2185 of file gdi.h.

#define SetTabStop ( hdc,
value   )     SetDCAttr (hdc, DC_ATTR_TAB_STOP, (DWORD) value)

Sets the tabstop of a DC to a new value.

Parameters:
hdc The device context.
value The new tabstop value in pixels.
Returns:
The old tabstop value in pixels of the DC hdc.
See also:
SetDCAttr, GetTabStop

Definition at line 2224 of file gdi.h.

#define SetTextColor ( hdc,
color   )     SetDCAttr (hdc, DC_ATTR_TEXT_COLOR, (DWORD) color)

Sets the text color of a DC to a new value.

Parameters:
hdc The device context.
color The new text color (pixel value).
Returns:
The old text color (pixel value) of the DC hdc.
See also:
SetDCAttr, GetTextColor

Definition at line 2211 of file gdi.h.


Function Documentation

Uint32 GUIAPI GetDCAttr ( HDC  hdc,
int  attr 
)

Gets a specified attribute value of a DC.

This function retrieves a specified attribute value of the DC hdc.

Parameters:
hdc The device context.
attr The attribute to be retrieved, can be one of the following values:
  • DC_ATTR_BK_COLOR
    Background color.
  • DC_ATTR_BK_MODE
    Background mode.
  • DC_ATTR_PEN_TYPE
    Pen type.
  • DC_ATTR_PEN_CAP_STYLE
    Cap style of pen.
  • DC_ATTR_PEN_JOIN_STYLE
    Join style of pen.
  • DC_ATTR_PEN_COLOR
    Pen color.
  • DC_ATTR_BRUSH_TYPE
    Brush type.
  • DC_ATTR_BRUSH_COLOR
    Brush color.
  • DC_ATTR_TEXT_COLOR
    Text color.
  • DC_ATTR_TAB_STOP
    Tabstop width.
  • DC_ATTR_CHAR_EXTRA
    Intercharacter spacing for the DC.
  • DC_ATTR_ALINE_EXTRA
    Spacing above line for the DC.
  • DC_ATTR_BLINE_EXTRA
    Spacing bellow line for the DC.
  • DC_ATTR_MAP_MODE
    mode of a DC.
  • DC_ATTR_TEXT_ALIGN
    Text-alignment flags of a DC.
Returns:
The attribute value.
See also:
SetDCAttr
int GUIAPI GetRasterOperation ( HDC  hdc  ) 

Gets the raster operation of a DC.

This function gets the raster operation of the DC hdc.

Parameters:
hdc The device context.
Returns:
The current raster operation of the DC hdc.
Return values:
ROP_SET Set to the new pixel value, erase original pixel on the surface.
ROP_AND AND'd the new pixel value with the original pixel on the surface.
ROP_OR OR'd the new pixel value with the original pixel on the surface.
ROP_XOR XOR'd the new pixel value with the original pixel on the surface.
ROP_COMPOSITE call default color composition the new pixel value with the original pixel on the surface.
ROP_COMP_USER User defined color composition operations.
See also:
SetRasterOperation, SetUserCompositionOps
Uint32 GUIAPI SetDCAttr ( HDC  hdc,
int  attr,
Uint32  value 
)

Sets a specified attribute value of a DC.

This function sets a specified attribute value of the DC hdc.

Parameters:
hdc The device context.
attr The attribute to be set.
value The attribute value.
Returns:
The old attribute value.
See also:
GetDCAttr
int GUIAPI SetRasterOperation ( HDC  hdc,
int  rop 
)

Sets the raster operation of a DC to a new value.

This function sets the raster operation of the DC hdc to the new value rop.

Parameters:
hdc The device context.
rop The new raster operation, can be one of the following values:
  • ROP_SET
    Set to the new pixel value, erase original pixel on the surface.
  • ROP_AND
    AND'd the new pixel value with the original pixel on the surface.
  • ROP_OR
    OR'd the new pixel value with the original pixel on the surface.
  • ROP_XOR
    XOR'd the new pixel value with the original pixel on the surface.
  • ROP_COMPOSITE
    call default color composition operators the new pixel value with the original pixel on the surface.
  • ROP_COMP_USER
    call user defined color composition operators the new pixel value with the original pixel on the surface.
Returns:
The old raster operation of the DC hdc.
See also:
GetRasterOperation, SetUserCompositionOps
Generated on Thu Apr 7 15:58:37 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3