Advanced 2-Dimension graphics functions.
[General drawing functions]

Data Structures

Defines

Typedefs

Enumerations

Functions


Define Documentation

#define GetBrushType ( hdc   )     GetDCAttr (hdc, DC_ATTR_BRUSH_TYPE)

Gets the brush type of a DC.

Parameters:
hdc The device context.
Returns:
The brush type of the DC hdc.
See also:
BrushType, GetDCAttr, SetBrushType

Definition at line 3729 of file gdi.h.

#define GetPenCapStyle ( hdc   )     GetDCAttr (hdc, DC_ATTR_PEN_CAP_STYLE)

Gets the pen cap style of a DC.

Parameters:
hdc The device context.
Returns:
The pen cap style of the DC hdc.
See also:
PTCapStyle, GetDCAttr, SetPenCapStyle

Definition at line 3602 of file gdi.h.

#define GetPenJoinStyle ( hdc   )     GetDCAttr (hdc, DC_ATTR_PEN_JOIN_STYLE)

Gets the pen join style of a DC.

Parameters:
hdc The device context.
Returns:
The pen join style of the DC hdc.
See also:
PTJoinStyle, GetDCAttr, SetPenJoinStyle

Definition at line 3647 of file gdi.h.

#define GetPenType ( hdc   )     GetDCAttr (hdc, DC_ATTR_PEN_TYPE)

Gets the pen type of a DC.

Parameters:
hdc The device context.
Returns:
The pen type of the DC hdc.
See also:
PenType, GetDCAttr, SetPenType

Definition at line 3533 of file gdi.h.

#define GetPenWidth ( hdc   )     GetDCAttr (hdc, DC_ATTR_PEN_WIDTH)

Gets the pen width of a DC.

Parameters:
hdc The device context.
Returns:
The width of the current pen in the DC hdc.
See also:
GetDCAttr, SetPenWidth

Definition at line 3671 of file gdi.h.

#define SetBrushType ( hdc,
type   )     SetDCAttr (hdc, DC_ATTR_BRUSH_TYPE, (DWORD) type)

Sets the brush type of a DC to a new type.

Parameters:
hdc The device context.
type The new brush type.
Returns:
The old brush type of the DC hdc.
See also:
BrushType, SetDCAttr, GetBrushType

Definition at line 3742 of file gdi.h.

#define SetPenCapStyle ( hdc,
style   )     SetDCAttr (hdc, DC_ATTR_PEN_CAP_STYLE, (DWORD) style)

Sets the pen type of a DC to a new type.

Parameters:
hdc The device context.
style The new pen cap style.
Returns:
The old pen cap style of the DC hdc.
See also:
PTCapStyle, SetDCAttr, GetPenCapStyle

Definition at line 3615 of file gdi.h.

#define SetPenJoinStyle ( hdc,
style   )     SetDCAttr (hdc, DC_ATTR_PEN_JOIN_STYLE, (DWORD) style)

Sets the pen type of a DC to a new type.

Parameters:
hdc The device context.
style The new pen join style.
Returns:
The old pen join style of the DC hdc.
See also:
PTJoinStyle, SetDCAttr, GetPenJoinStyle

Definition at line 3659 of file gdi.h.

#define SetPenType ( hdc,
type   )     SetDCAttr (hdc, DC_ATTR_PEN_TYPE, (DWORD) type)

Sets the pen type of a DC to a new type.

Parameters:
hdc The device context.
type The new pen type.
Returns:
The old pen type of the DC hdc.
See also:
PenType, SetDCAttr, GetPenType

Definition at line 3546 of file gdi.h.

#define SetPenWidth ( hdc,
width   )     SetDCAttr (hdc, DC_ATTR_PEN_WIDTH, (DWORD) width)

Sets the pen width of a DC to a new width.

Parameters:
hdc The device context.
width The new pen width.
Returns:
The old pen width of the DC hdc.
See also:
SetDCAttr, GetPenWidth

Definition at line 3684 of file gdi.h.


Typedef Documentation

typedef struct _ARC ARC

Arc structure.

typedef struct _STIPPLE STIPPLE

The stipple bitmap structure.


Enumeration Type Documentation

enum BrushType

DC brush types. Solid: Tiled: Stippled: OpaqueStippled:

Enumerator:
BT_SOLID 

Draw with the current brush color.

BT_TILED 

Draw with a tiled bitmap.

BT_STIPPLED 

Draw using the stipple bitmap. Pixels corresponding to bits in the stipple bitmap that are set will be drawn in the brush color; pixels corresponding to bits that are not set will be left untouched.

BT_OPAQUE_STIPPLED 

Draw using the stipple bitmap. Pixels corresponding to bits in the stipple bitmap that are set will be drawn in the brush color; pixels corresponding to bits that are not set will be drawn with the background color.

Definition at line 3694 of file gdi.h.

enum PenType

DC Line styles

Enumerator:
PT_SOLID 

The solid pen. We call the solid pen with zero wide as "zero pen".

PT_ON_OFF_DASH 

The on/off dash pen, even segments are drawn; odd segments are not drawn.

PT_DOUBLE_DASH 

The double dash pen, even segments are normally. Odd segments are drawn in the brush color if the brush type is BT_SOLID, or in the brush color masked by the stipple if the brush type is BT_STIPPLED.

Definition at line 3503 of file gdi.h.

enum PTCapStyle

DC Line cap styles

Enumerator:
PT_CAP_BUTT 

The ends of the lines are drawn squared off and extending to the coordinates of the end point.

PT_CAP_ROUND 

The ends of the lines are drawn as semicircles with the diameter equal to the line width and centered at the end point.

PT_CAP_PROJECTING 

The ends of the lines are drawn squared off and extending half the width of the line beyond the end point.

Definition at line 3574 of file gdi.h.

DC Line join styles

Enumerator:
PT_JOIN_MITER 

The sides of each line are extended to meet at an angle.

PT_JOIN_ROUND 

The sides of the two lines are joined by a circular arc.

PT_JOIN_BEVEL 

The sides of the two lines are joined by a straight line which makes an equal angle with each line.

Definition at line 3621 of file gdi.h.


Function Documentation

void GUIAPI ArcEx ( HDC  hdc,
int  x,
int  y,
int  width,
int  height,
int  ang1,
int  ang2 
)

Draws an arc with the current pen in a DC.

This function draws an arc with the current pen in the DC hdc. The coordinates of the upper-left corner of the bounding rectanglecenter of the arc is (x, y), the bounding box of the arc is width wide and height high, and the degree of start angle and end angle are ang1 and ang2 respectively.

Parameters:
hdc The device context.
x The x coordinate of the left edge of the bounding rectangle.
y The y coordinate of the left edge of the bounding rectangle.
width The width of the bounding box of the arc.
height The height of the bounding box of the arc.
ang1 The start angle of the arc, relative to the 3 o'clock position, counter-clockwise, in 1/64ths of a degree.
ang2 The end angle of the arc, relative to angle1, in 1/64ths of a degree.
See also:
DC attribute operations
void GUIAPI FillArcEx ( HDC  hdc,
int  x,
int  y,
int  width,
int  height,
int  ang1,
int  ang2 
)

Fills an arc with the current brush in a DC.

This function fills an arc with the current brush in the DC hdc. The coordinates of the upper-left corner of the bounding rectanglecenter of the arc is (x, y), the bounding box of the arc is width wide and height high, and the degree of start angle and end angle are ang1 and ang2 respectively.

Parameters:
hdc The device context.
x The x coordinate of the left edge of the bounding rectangle.
y The y coordinate of the left edge of the bounding rectangle.
width The width of the bounding box of the arc.
height The height of the bounding box of the arc.
ang1 The start angle of the arc, relative to the 3 o'clock position, counter-clockwise, in 1/64ths of a degree.
ang2 The end angle of the arc, relative to angle1, in 1/64ths of a degree.
See also:
ArcEx, DC attribute operations
void GUIAPI LineEx ( HDC  hdc,
int  x1,
int  y1,
int  x2,
int  y2 
)

Draws a line with the current pen in the DC hdc.

This function draws a line with the current pen in the DC hdc. The line draws from (x1, y1) to (x2, y2).

Parameters:
hdc The device context.
x1 x1,y1: The start point of the line.
y1 x1,y1: The start point of the line.
x2 x2,y2: The end point of the line.
y2 x2,y2: The end point of the line.
Note:
This function does not change the pen position.
See also:
LineTo, DC attribute operations
void GUIAPI PolyArcEx ( HDC  hdc,
const ARC arcs,
int  nr_arcs 
)

Draws a polyarc with the current pen in a DC.

This function draws a polyarc with the current pen in the DC hdc.

Parameters:
hdc The device context.
arcs The pointer to an ARC array which defines the arcs.
nr_arcs The number of the arcs.
See also:
ArcEx
void GUIAPI PolyFillArcEx ( HDC  hdc,
const ARC arcs,
int  nr_arcs 
)

Fill a polyarc with the current brush in a DC.

This function fill a polyarc with the current brush in the DC hdc.

Parameters:
hdc The device context.
arcs The pointer to an ARC array which defines the arcs.
nr_arcs The number of the arcs.
See also:
ArcEx
void GUIAPI PolyLineEx ( HDC  hdc,
const POINT pts,
int  nr_pts 
)

Draws a polyline with the current pen in a DC.

This function draws a polyline with the current pen in the DC hdc.

Parameters:
hdc The device context.
pts The pointer to the vertex array of the polyline.
nr_pts The number of the vertices.
See also:
LineEx
BOOL GUIAPI RoundRect ( HDC  hdc,
int  x0,
int  y0,
int  x1,
int  y1,
int  rw,
int  rh 
)

Draw and fill a rectangle with rounded corners in a DC.

This function draws a rectangle with rounded corners. The rectangle is outlined by using the current pen and filled by using the current brush in the DC hdc.

Parameters:
hdc The device context.
x0 The x-coordinate of the upper-left corner of the rectangle.
y0 The y-coordinate of the upper-left corner of the rectangle.
x1 The x-coordinate of the lower-right corner of the rectangle.
y1 The y-coordinate of the lower-right corner of the rectangle.
rw The x-radius of the rounded corners.
rh The y-radius of the rounded corners.
Returns:
TRUE for visible, else for not.
See also:
ArcEx, LineEx, FillArcEx, FillBox
void GUIAPI SetBrushInfo ( HDC  hdc,
const BITMAP tile,
const STIPPLE stipple 
)

Set the tile or stipple with the DC.

Parameters:
hdc The device context.
tile The tile bitmap.
stipple The stipple bitmap.
See also:
SetBrushInfo
void GUIAPI SetBrushOrigin ( HDC  hdc,
int  x,
int  y 
)

Set the origin when using tiles or stipples with the DC.

Set the origin when using tiles or stipples with the DC. The tile or stipple will be aligned such that the upper left corner of the tile or stipple will coincide with this point.

Parameters:
hdc The device context.
x The x-coordinate of the origin.
y The y-coordinate of the origin.
See also:
SetBrushInfo
void SetPenDashes ( HDC  hdc,
int  dash_offset,
const unsigned char *  dash_list,
int  n 
)

Sets the way dashed-lines are drawn.

Sets the way dashed-lines are drawn. Lines will be drawn with alternating on and off segments of the lengths specified in dash_list. The manner in which the on and off segments are drawn is determined by the pen type of the DC. (This can be changed with SetPenType function.)

Parameters:
hdc The device context.
dash_offset The offset in the dash list.
dash_list The dash list.
n The lenght of the dash list.
Returns:
The old pen type of the DC hdc.
See also:
SetPenType
Generated on Thu Apr 7 16:01:52 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3