General drawing functions
[GDI functions]

Modules

Defines

Typedefs

Functions


Define Documentation

#define DrawHDotLine ( hdc,
x,
y,
 )     DrawHVDotLine (hdc, x, y, w, TRUE);

Draws a horizontal dot dash line.

This function draws a horizontal dot dash line with the zero pen.

Parameters:
hdc The device context.
x x,y: The start point of the line.
y x,y: The start point of the line.
w The width of the horizontal dot line.
Note:
Defined as a macro calling DrawHVDotLine.
See also:
DrawVDotLine, DrawHVDotLine

Definition at line 2926 of file gdi.h.

#define DrawVDotLine ( hdc,
x,
y,
 )     DrawHVDotLine (hdc, x, y, h, FALSE);

Draws a vertical dot line.

This function draws a vertical dot dash line with the zero pen.

Parameters:
hdc The device context.
x x,y: The start point of the line.
y x,y: The start point of the line.
h The height of the horizontal dot line.
Note:
Defined as a macro calling DrawHVDotLine.
See also:
DrawHDotLine, DrawHVDotLine

Definition at line 2944 of file gdi.h.

#define PolygonGenerator ( context,
pts,
vertices,
cb   )     PolygonGeneratorEx(context, pts, vertices, cb, NULL)

This is a general polygon generator.

Defined as a macro calling PolygonGeneratorEx passing and rc_output as NULL.

See also:
PolygonGeneratorEx

Definition at line 3214 of file gdi.h.


Typedef Documentation

typedef void(* CB_ARC)(void *context, int x, int y)

The type of arc generator callback.

Definition at line 3082 of file gdi.h.

typedef void(* CB_CIRCLE)(void *context, int x1, int x2, int y)

The type of circle generator callback.

Definition at line 3013 of file gdi.h.

typedef void(* CB_ELLIPSE)(void *context, int x1, int x2, int y)

The type of ellipse generator callback.

Definition at line 3049 of file gdi.h.

typedef BOOL(* CB_EQUAL_PIXEL)(void *context, int x, int y)

Flodd filling generator's equation callback.

Definition at line 3221 of file gdi.h.

typedef void(* CB_FLOOD_FILL)(void *context, int x1, int x2, int y)

Flodd filling generator's scan line callback.

Definition at line 3227 of file gdi.h.

typedef void(* CB_LINE)(void *context, int stepx, int stepy)

The type of line generator callback.

Definition at line 2982 of file gdi.h.

typedef void(* CB_POLYGON)(void *context, int x1, int x2, int y)

The type of polygon generator callback.

Definition at line 3114 of file gdi.h.


Function Documentation

void GUIAPI Circle ( HDC  hdc,
int  sx,
int  sy,
int  r 
)

Draws a circle.

This function draws a circle with the zero pen on the DC hdc. The center of the circle is at (sx, sy), and the radius is r.

Parameters:
hdc The device context.
sx sx,sy: The center of the circle.
sy sx,sy: The center of the circle.
r The radius of the circle.
See also:
CircleGenerator
void GUIAPI CircleArc ( HDC  hdc,
int  sx,
int  sy,
int  r,
int  ang1,
int  ang2 
)

Draws an arc.

This function draws an arc with the zero pen on the DC hdc. The center of the arc is at (sx, sy), the radius is r, and the radians of start angle and end angle are ang1 and ang2 respectively.

Parameters:
hdc The device context.
sx sx,sy: The center of the arc.
sy sx,sy: The center of the arc.
r The radius 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:
CircleArcGenerator, Fixed point math functions, DC attribute operations
void GUIAPI CircleArcGenerator ( void *  context,
int  sx,
int  sy,
int  r,
int  ang1,
int  ang2,
CB_ARC  cb 
)

An arc generator.

This is a general arc generator. When it generates a point on the arc, it will call the callback cb and pass the context context, the coordinates of the point.

MiniGUI implements CircleArc function by using this generator.

Parameters:
context The context, will be passed to the callback cb.
sx sx,sy: The center of the arc.
sy sx,sy: The center of the arc.
r The radius 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.
cb The arc generator callback.
See also:
CircleArc, CB_ARC
void GUIAPI CircleGenerator ( void *  context,
int  sx,
int  sy,
int  r,
CB_CIRCLE  cb 
)

A circle generator.

This is a general circle generator, it will generate two points on the same horizontal scan line at every turn. When it generates the points on the circle, it will call the callback cb and pass the context context, the y-coordinate of the scan line, the x-coordinate of the left point on the scan line, and the x-coordinate of the right point. Note that in some cases, the left point and the right point will be the same.

MiniGUI implements Circle, FillCircle and InitCircleRegion functions by using this generator.

Parameters:
context The context, will be passed to the callback cb.
sx sx,sy: The center of the circle.
sy sx,sy: The center of the circle.
r The radius of the circle.
cb The circle generator callback.
See also:
Circle, FillCircle, InitCircleRegion, CB_CIRCLE

Example:

/*
 * Draw a circle which is 4 pixels wide by using CircleGenerator.
 */
static void draw_circle_pixel (void* context, int x1, int x2, int y)
{
    HDC hdc = (HDC) context;

    FillCircle (hdc, x1, y, 2);
    FillCircle (hdc, x2, y, 2);
}

void DrawMyCircle (HDC hdc, int x, int y, int r, gal_pixel pixel)
{
    gal_pixel old_brush;

    old_bursh = SetBrushColor (hdc, pixle);

    CircleGenerator ((void*)hdc, x, y, r, draw_circle_pixel);
    
    SetBrushColor (hdc, old_brush);
}
void GUIAPI DrawHVDotLine ( HDC  hdc,
int  x,
int  y,
int  w_h,
BOOL  H_V 
)

Draws a horizontal or vertical dot dash line.

This function draws a horizontal or vertical dot dash line with the zero pen.

Parameters:
hdc The device context.
x x,y: The start point of the line.
y x,y: The start point of the line.
w_h The width of the line or horizontal dot line, or the height if you want to draw a vertical dot line.
H_V Specify whether you want to draw a horizontal or vertical line. TRUE for horizontal, FALSE for vertical.
See also:
FocusRect
gal_pixel DWORD2PIXEL ( HDC  hdc,
DWORD  dword 
) [inline, static]

An inline function to convert DWORD color to gal_pixel.

This function converts a color in DWORD to pixel value.

Parameters:
hdc The device context.
dword The color value in DWORD.
Returns:
The converted pixel value.

Definition at line 2865 of file gdi.h.

References GetAValue, GetBValue, GetGValue, GetRValue, and RGBA2Pixel().

void GUIAPI Ellipse ( HDC  hdc,
int  sx,
int  sy,
int  rx,
int  ry 
)

Draws a ellipse.

This function draws an ellipse with the zero pen on the DC hdc. The center of the ellipse is at (sx, sy), the x-coordinate radius is rx, and the y-coordinate radius is ry.

Parameters:
hdc The device context.
sx sx,sy: The center of the ellipse.
sy sx,sy: The center of the ellipse.
rx The x-coordinate radius of the ellipse.
ry The y-coordinate radius of the ellipse.
See also:
EllipseGenerator, DC attribute operations
void GUIAPI EllipseGenerator ( void *  context,
int  sx,
int  sy,
int  rx,
int  ry,
CB_ELLIPSE  cb 
)

An ellipse generator.

This is a general ellipse generator, it will generate two points on the same horizontal scan line at every turn. When it generates the points on the ellipse, it will call the callback cb and pass the context context, the y-coordinate of the scan line, the x-coordinate of the left point on the scan line, and the x-coordinate of the right point. Note that in some cases, the left point and the right point will be the same.

MiniGUI implements Ellipse, FillEllipse, and InitEllipseRegion functions by using this generator.

Parameters:
context The context, will be passed to the callback cb.
sx sx,sy: The center of the ellipse.
sy sx,sy: The center of the ellipse.
rx The x-radius of the ellipse.
ry The y-radius of the ellipse.
cb The ellipse generator callback.
See also:
Ellipse, FillEllipse, InitEllipseRegion, CB_CIRCLE
void GUIAPI FillBox ( HDC  hdc,
int  x,
int  y,
int  w,
int  h 
)

Fills a rectangle box.

This function fills a box with the current brush in the DC hdc.

Parameters:
hdc The device context.
x x,y: The coorinates of the upper-left corner of the box.
y x,y: The coorinates of the upper-left corner of the box.
w The width of the box.
h The height of the box.
See also:
DC attribute operations
void GUIAPI FillCircle ( HDC  hdc,
int  sx,
int  sy,
int  r 
)

Fills a circle.

This function fills a circle with the current brush in the DC hdc.

Parameters:
hdc The device context.
sx sx,sy: The center of the circle.
sy sx,sy: The center of the circle.
r The radius of the circle.
See also:
CircleGenerator, DC attribute operations
void GUIAPI FillEllipse ( HDC  hdc,
int  sx,
int  sy,
int  rx,
int  ry 
)

Fills an ellipse.

This function fills an ellipse with the current brush in the DC hdc. Note that MiniGUI only defined the color property for the brush objects so far.

Parameters:
hdc The device context.
sx sx,sy: The center of the circle.
sy sx,sy: The center of the circle.
rx The x-coordinate radius of the ellipse.
ry The y-coordinate radius of the ellipse.
See also:
EllipseGenerator, DC attribute operations
BOOL GUIAPI FillPolygon ( HDC  hdc,
const POINT pts,
int  vertices 
)

Fills an polygon.

This function fills a polygon with the current brush in the DC hdc.

Parameters:
hdc The device context.
pts The pointer to the vertex array of the polygon.
vertices The number of the vertices, i.e. the size of the vertex array.
See also:
PolygonGenerator, DC attribute operations
BOOL GUIAPI FloodFill ( HDC  hdc,
int  x,
int  y 
)

Fills an enclosed area starting at point (x,y).

This function fills an enclosed area staring at point (x,y), and stops when encountering a pixel different from the start point.

Parameters:
hdc The device context.
x x,y: The start point.
y x,y: The start point.
See also:
FloodFillGenerator, DC attribute operations
BOOL GUIAPI FloodFillGenerator ( void *  context,
const RECT src_rc,
int  x,
int  y,
CB_EQUAL_PIXEL  cb_equal_pixel,
CB_FLOOD_FILL  cb_flood_fill 
)

A flood filling generator.

This function is a general flood filling generator.

MiniGUI implements FloodFill function by using this generator.

Parameters:
context The context, will be passed to the callback cb.
src_rc The filling bounding rectangle.
x x,y: The start filling point.
y x,y: The start filling point.
cb_equal_pixel The callback to check the pixel is equal with the start point or not.
cb_flood_fill The callback to fill a scan line.
See also:
FloodFill, CB_EQUAL_PIXEL, CB_FLOOD_FILL
void GUIAPI FocusRect ( HDC  hdc,
int  x0,
int  y0,
int  x1,
int  y1 
)

Draws a focus rectangle.

This function uses XOR mode to draw the focus rectangle on the device context, i.e. calling this function then calling this function with same arguments again will erase the focus rectangle and restore the pixels before the first call.

Parameters:
hdc The device context.
x0 x0,y0: The coordinates of upper-left corner of the rectangle.
y0 x0,y0: The coordinates of upper-left corner of the rectangle.
x1 x1,y1: The corrdinates of lower-right corner of the rectangle.
y1 x1,y1: The corrdinates of lower-right corner of the rectangle.
See also:
DrawHVDotLine
gal_pixel GUIAPI GetPixel ( HDC  hdc,
int  x,
int  y 
)

Gets the pixel value at the specified position on a DC.

This function gets the pixel value at the specified position (x,y) on the DC hdc.

Parameters:
hdc The device context.
x x,y: The pixel position.
y x,y: The pixel position.
Returns:
The pixel value.
See also:
SetPixel
gal_pixel GUIAPI GetPixelRGB ( HDC  hdc,
int  x,
int  y,
Uint8 r,
Uint8 g,
Uint8 b 
)

Gets the pixel value at the specified position on a DC in RGB triple.

This function gets the pixel value at the specified position (x,y) on the DC hdc in RGB triple.

Parameters:
hdc The device context.
x x,y: The pixel position.
y x,y: The pixel position.
r The red component of the pixel will be returned through this pointer.
g The green component of the pixel will be returned through this pointer.
b The blue component of the pixel will be returned through this pointer.
Returns:
The pixel value.
See also:
SetPixelRGB
gal_pixel GUIAPI GetPixelRGBA ( HDC  hdc,
int  x,
int  y,
Uint8 r,
Uint8 g,
Uint8 b,
Uint8 a 
)

Gets the pixel value at the specified position on a DC in RGBA quarter.

This function gets the pixel value at the specified position (x,y) on the DC hdc in RGBA quarter.

Parameters:
hdc The device context.
x x,y: The pixel position.
y x,y: The pixel position.
r The red component of the pixel will be returned through this pointers.
g The green component of the pixel will be returned through this pointers.
b The blue component of the pixel will be returned through this pointers.
a The alpha component of the pixel will be returned through this pointers.
Returns:
The pixel value.
See also:
SetPixelRGBA
BOOL GUIAPI LineClipper ( const RECT cliprc,
int *  _x0,
int *  _y0,
int *  _x1,
int *  _y1 
)

The line clipper using Cohen-Sutherland algorithm.

This function clips a line from (*_x0,*_y0) to (*_x1, *_y1) with the specified clipping rectangle pointed to by cliprc. Then return the clipped line throught the pointers (_x0, _y0, _x1, _y1).

It is modified to do pixel-perfect clipping. This means that it will generate the same endpoints that would be drawn if an ordinary Bresenham line-drawer where used and only visible pixels drawn.

Parameters:
cliprc The Pointer to the clipping rectangle.
_x0 _x0,_y0: The pointers contains the start point of the line. The start point after clipping will be returned through them as well as.
_y0 _x0,_y0: The pointers contains the start point of the line. The start point after clipping will be returned through them as well as.
_x1 _x1,_y1: The pointers contains the end point of the line. The end point after clipping will be returned through them as well as.
_y1 _x1,_y1: The pointers contains the end point of the line. The end point after clipping will be returned through them as well as.
Returns:
TRUE for clipped by the clipping rectangle, FALSE for not clipped.
See also:
LineGenerator
void GUIAPI LineGenerator ( void *  context,
int  x1,
int  y1,
int  x2,
int  y2,
CB_LINE  cb 
)

A line generator based-on Breshenham algorithm.

This is a Breshenham line generator. When it generates a new point on the line, it will call the callback cb and pass the context context and the step values on x-coordinate and y-coodinate since the last point. The first generated point always be the start point you passed to this function. Thus, the first step values passed to cb will be (0,0).

MiniGUI implements LineTo function by using this generator.

Parameters:
context The context, will be passed to the callback cb.
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.
cb The line generator callback.
See also:
LineTo, LineClipper, CB_LINE
void GUIAPI LineTo ( HDC  hdc,
int  x,
int  y 
)

Draws a zero line to a position.

This function draws a line from the current zero pen position to (x,y), and then moves the zero pen position to (x,y) by using the zero pen. The next zero line drawing operation will start from the position.

Parameters:
hdc The device context.
x x,y: The end point of the line.
y x,y: The end point of the line.
See also:
MoveTo, LineGenerator, DC attribute operations
BOOL GUIAPI MonotoneVerticalPolygonGenerator ( void *  context,
const POINT pts,
int  vertices,
CB_POLYGON  cb 
)

A monotone vertical polygon generator.

This is a monotone vertical polygon generator.

"Monoton vertical" means "monotone with respect to a vertical line"; that is, every horizontal line drawn through the polygon at any point would cross exactly two active edges (neither horizontal lines nor zero-length edges count as active edges; both are acceptable anywhere in the polygon). Right & left edges may cross (polygons may be nonsimple). Polygons that are not convex according to this definition won't be drawn properly.

You can call PolygonIsMonotoneVertical function to check one polygon is monotone vertical or not.

This function will generate two points on the same horizontal scan line at every turn. When it generates the points on the polygon, it will call the callback cb and pass the context context, the y-coordinate of the scan line, the x-coordinate of the left point on the scan line, and the x-coordinate of the right point. Note that in some cases, the left point and the right point will be the same.

MiniGUI implements FillPolygon and InitPolygonRegion functions by using this generator.

Parameters:
context The context, will be passed to the callback cb.
pts The pointer to the vertex array of the polygon.
vertices The number of the vertices, i.e. the size of the vertex array.
cb The polygon generator callback.
Returns:
TRUE on success, FALSE on error.
See also:
FillPolygon, InitPolygonRegion, PolygonIsMonotoneVertical, CB_CIRCLE
void GUIAPI MoveTo ( HDC  hdc,
int  x,
int  y 
)

Moves the current zero pen position.

This function moves the current pen position of the DC hdc to (x,y). The next line or other pen drawing operation will start from the position.

Parameters:
hdc The device context.
x x,y: The new pen position.
y x,y: The new pen position.
See also:
LineTo
DWORD GUIAPI Pixel2DWORD ( HDC  hdc,
gal_pixel  pixel 
) [inline, static]

An inline function to convert pixel value to DWORD color.

This function converts a pixel value to color in DWORD.

Parameters:
hdc The device context.
pixel The pixel value to be converted.
Returns:
The converted color value in DWORD.

Definition at line 2846 of file gdi.h.

References MakeRGBA, and Pixel2RGBA().

void GUIAPI Pixel2RGB ( HDC  hdc,
gal_pixel  pixel,
Uint8 r,
Uint8 g,
Uint8 b 
) [inline, static]

Gets the color in RGB triple from a pixel value under a DC.

This function gets the color in RGB triple from the pixel value pixel under the DC hdc.

Parameters:
hdc The device context.
pixel The pixel value.
r The red component of the pixel will be returned through this pointer.
g The green component of the pixel will be returned through this pointer.
b The blue component of the pixel will be returned through this pointer.
Note:
This function is implemented as an inline to RGB2Pixels.
See also:
Pixel2RGBs, RGB2Pixel

Definition at line 2780 of file gdi.h.

References _RGB::b, _RGB::g, Pixel2RGBs(), and _RGB::r.

void GUIAPI Pixel2RGBA ( HDC  hdc,
gal_pixel  pixel,
Uint8 r,
Uint8 g,
Uint8 b,
Uint8 a 
) [inline, static]

Gets the color in RGBA quarter from a pixel value under a DC.

This function gets the color in RGBA quarter from the pixel value pixel under the DC hdc.

Parameters:
hdc The device context.
pixel The pixel value.
r The red component of the pixel will be returned through this pointer.
g The green component of the pixel will be returned through this pointer.
b The blue component of the pixel will be returned through this pointer.
a The alpha component of the pixel will be returned through this pointer.
Note:
This function is implemented as an inline to RGBA2Pixels.
See also:
RGBA2Pixels, RGB2Pixel

Definition at line 2828 of file gdi.h.

References _RGB::a, _RGB::b, _RGB::g, Pixel2RGBAs(), and _RGB::r.

Referenced by Pixel2DWORD().

void GUIAPI Pixel2RGBAs ( HDC  hdc,
const gal_pixel pixels,
RGB rgbs,
int  count 
)

Gets the colors in RGBA quarter from a array of pixel values under a DC.

This function gets the colors in RGBA quarter from the pixel value array pixels under the DC hdc.

Parameters:
hdc The device context.
pixels The array of pixel values.
rgbs The array returns the converted RGB quarters.
count The number of pixels.
See also:
RGB2Pixels

Referenced by Pixel2RGBA().

void GUIAPI Pixel2RGBs ( HDC  hdc,
const gal_pixel pixels,
RGB rgbs,
int  count 
)

Gets the colors in RGB triple from a pixel value array under a DC.

This function gets the colors in RGB triple from the pixel value array pixels under the DC hdc.

Parameters:
hdc The device context.
pixels The array of pixel values.
rgbs The array returns the converted RGB triples.
count The number of pixels.
See also:
RGB2Pixels

Referenced by Pixel2RGB().

BOOL GUIAPI PolygonGeneratorEx ( void *  context,
const POINT pts,
int  vertices,
CB_POLYGON  cb,
RECT rc_output 
)

A general polygon generator.

This is a general polygon generator.

This function will generate two points on the same horizontal scan line at every turn. When it generates the points on the polygon, it will call the callback cb and pass the context context, the y-coordinate of the scan line, the x-coordinate of the left point on the scan line, and the x-coordinate of the right point. Note that in some cases, the left point and the right point will be the same.

MiniGUI implements FillPolygon and InitPolygonRegion functions by using this generator.

Parameters:
context The context, will be passed to the callback cb.
pts The pointer to the vertex array of the polygon.
vertices The number of the vertices, i.e. the size of the vertex array.
cb The polygon generator callback.
rc_output The limit RECT for Polygon ScanLines ranges .
See also:
FillPolygon, InitPolygonRegion, CB_CIRCLE
BOOL GUIAPI PolygonIsMonotoneVertical ( const POINT pts,
int  vertices 
)

Checks a polygon is monotone vertical or not.

This function checks if the given polygon is monotone vertical.

Parameters:
pts The pointer to the vertex array of the polygon.
vertices The number of the vertices, i.e. the size of the vertex array.
Returns:
TRUE if it is monotonoe vertical, otherwise FALSE.
Note:
To make sure a polygon is monotone vertical, the polygon must be a closed one, that is, the pts[0] must be equal to the pts[vertices-1].
See also:
MonotoneVerticalPolygonGenerator
void GUIAPI PolyLineTo ( HDC  hdc,
const POINT pts,
int  vertices 
)

Draws a polyline.

This function draws a polyline by using MoveTo and LineTo. The current zero pen position after calling this function will be the last vertex of the polyline.

Parameters:
hdc The device context.
pts The pointer to the vertex array of the polyline.
vertices The number of the vertices.
See also:
MoveTo, LineTo
void GUIAPI Rectangle ( HDC  hdc,
int  x0,
int  y0,
int  x1,
int  y1 
)

Draws a rectangle.

This function draws a rectangle by using MoveTo and LineTo. The current zero pen position after calling this function will be (x1,y1).

Parameters:
hdc The device context.
x0 x0,y0: The coordinates of the upper-left corner of the rectangle.
y0 x0,y0: The coordinates of the upper-left corner of the rectangle.
x1 x1,y1: The coordinates of the lower-right corner of the rectangle.
y1 x1,y1: The coordinates of the lower-right corner of the rectangle.
See also:
MoveTo, LineTo
gal_pixel GUIAPI RGB2Pixel ( HDC  hdc,
Uint8  r,
Uint8  g,
Uint8  b 
) [inline, static]

Gets the pixel value from a color in RGB triple under a DC.

This function gets the pixel value from the RGB triple (r,g,b) under the DC hdc.

Parameters:
hdc The device context.
r The red component of a color.
g The green component of a color.
b The blue component of a color.
Returns:
The pixel value.
Note:
This function is implemented as an inline to RGB2Pixels.
See also:
RGB2Pixels, Pixel2RGB

Definition at line 2733 of file gdi.h.

References RGB2Pixels().

void GUIAPI RGB2Pixels ( HDC  hdc,
const RGB rgbs,
gal_pixel pixels,
int  count 
)

Gets the pixel values from a color array in RGB triple under a DC.

This function gets the pixel values from the RGB triple array rgbs under the DC hdc.

Parameters:
hdc The device context.
rgbs The array of RGB triples to be converted.
pixels The array returns the converted pixel values.
count The number of RGB triples.
See also:
Pixel2RGBs

Referenced by RGB2Pixel().

gal_pixel GUIAPI RGBA2Pixel ( HDC  hdc,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
) [inline, static]

Gets the pixel value from a color in RGBA quarter under a DC.

This function gets the pixel value from the RGB quarter (r,g,b,a) under the DC hdc.

Parameters:
hdc The device context.
r The red component of a color.
g The green component of a color.
b The blue component of a color.
a The alpha component of a color.
Returns:
The pixel value.
Note:
This function is implemented as an inline to RGBA2Pixels.
See also:
RGBA2Pixels, Pixel2RGBA

Definition at line 2689 of file gdi.h.

References RGBA2Pixels().

Referenced by DWORD2PIXEL().

void GUIAPI RGBA2Pixels ( HDC  hdc,
const RGB rgbs,
gal_pixel pixels,
int  count 
)

Gets the pixel values from a color array in RGBA quarter under a DC.

This function gets the pixel values from the RGB quarter array rgbs under the DC hdc.

Parameters:
hdc The device context.
rgbs The array of RGBA quarters to be converted.
pixels The array returns the converted pixel values.
count The number of RGBA quarters.
See also:
Pixel2RGBAs

Referenced by RGBA2Pixel().

int GUIAPI SetBitmapScalerType ( HDC  hdc,
int  scaler_type 
)

set bitmap scaler algorithm callback of DC according by scaler_type.

This function is a set general bitmap scaler type that is DDA or Bilinear interpolation algorithm. MiniGUI implements StretchBlt functions by using this scaler.

Parameters:
hdc The device context.
scaler_type The type of scaler algorithm, BITMAP_SCALER_DDA or BITMAP_SCALER_BILINEAR.
See also:
BitmapDDAScaler, BitmapBinearScaler
void GUIAPI SetPixel ( HDC  hdc,
int  x,
int  y,
gal_pixel  pixel 
)

Sets the pixel with a new pixel value at the specified position on a DC.

This function sets the pixel with a pixel value pixel at the specified position (x,y) on the DC hdc. You can the pre-defined standard system pixel values.

Parameters:
hdc The device context.
x x,y: The pixel position.
y x,y: The pixel position.
pixel The pixel value.
See also:
GetPixel, System colors and pixel values.
gal_pixel GUIAPI SetPixelRGB ( HDC  hdc,
int  x,
int  y,
Uint8  r,
Uint8  g,
Uint8  b 
)

Sets the pixel by a RGB triple at the specified position on a DC.

This function sets the pixel with a RGB triple (r,g,b) at the specified position (x,y) on the DC hdc.

Parameters:
hdc The device context.
x x,y: The pixel position.
y x,y: The pixel position.
r The red component of a color.
g The green component of a color.
b The blue component of a color.
Returns:
The pixel value of the RGB triple.
See also:
GetPixel, RGB2Pixel
gal_pixel GUIAPI SetPixelRGBA ( HDC  hdc,
int  x,
int  y,
Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a 
)

Sets the pixel by a RGBA quarter at the specified position on a DC.

This function sets the pixel with a RGBA quarter (r,g,b,a) at the specified position (x,y) on the DC hdc.

Parameters:
hdc The device context.
x x,y: The pixel position.
y x,y: The pixel position.
r The red component of a color.
g The green component of a color.
b The blue component of a color.
a The alpha component of a color.
Returns:
The pixel value of the RGBA quarter.
See also:
GetPixel, RGBA2Pixel
void GUIAPI SplineTo ( HDC  hdc,
const POINT pts 
)

Draws a bezier spline.

This function draws a bezier spline by using MoveTo and LineTo. The current pen position after calling this function will be the last control point of the spline. Note that the number of the control points should always be 4.

Parameters:
hdc The device context.
pts The pointer to the control point array of the spline.
See also:
MoveTo, LineTo
Generated on Thu Apr 7 15:58:38 2011 for MiniGUI V3.0.12 API Reference by  doxygen 1.6.3