|
Styling help
Real API_Draw_CreateSolidBrush (Real Color);
This function creates a solid brush ( a single color filling).
Return value:
Returns the brush resource handle.
Real API_Draw_CreatePatternBrush (Real Bitmap Resource Handle);
This function creates a pattern brush from a bitmap resource handle.
Return value:
Returns the brush resource handle.
Real API_Draw_CreateHatchBrush (Real Hatch Style, Real Hatch Color);
This function creates a hatch brush.
Hatch styles:
HS_BDIAGONAL 45-degree upward left-to-right hatch
HS_CROSS Horizontal and vertical crosshatch
HS_DIAGCROSS 45-degree crosshatch
HS_FDIAGONAL 45-degree downward left-to-right hatch
HS_HORIZONTAL Horizontal hatch
HS_VERTICAL Vertical hatch
Return value:
Returns the brush resource handle.
Real API_Draw_CreatePen (Real Pen Style, Real Pen Size, Real Pen Color);
This function creates a pen.
PS_SOLID The pen is solid.
PS_DASH The pen is dashed.
PS_DOT The pen is dotted.
PS_DASHDOT The pen has alternating dashes and dots.
PS_DASHDOTDOT The pen has alternating dashes and double dots.
PS_NULL The pen is invisible.
PS_INSIDEFRAME The pen is solid. When this pen is used in any drawing function that takes a bounding rectangle, the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. This applies only to geometric pens.
Return value:
Returns the pen resource handle.
Real API_Draw_CreateFont (String Font Name, Real Font Size);
This function creates a font handle.
You can use the API_Styling_PrepareFont to specify extended font settings before calling this function.
Return value:
Returns the font resource handle.
The following functions are made to draw on a Device Context.
An example of a Device Context is the returned value of API_GB_GetDC.
Real API_Draw_SelectObject (Real DC Handle, Real Resource Handle);
This function selects an object into the Device Context using it's resource handle.
For example, if you use a resource font handle returned by API_Draw_CreateFont, it will be the current font for text drawing functions.
The resource handle types you can select are bitmaps, brushes, fonts, pens and regions.
Return value:
Returns the previous selected object for the resource handle type.
Real API_Draw_PaintRegion (Real DC Handle, Real Resource Handle);
This function paints a region using the currently selected brush.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_FillRegion (Real DC Handle, Real Resource Handle, Real Brush Resource Handle);
This function paints a region using the choosen brush.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_Arc (Real DC Handle, Real X1, Real X1, Real X2, Real X2, Real X3, Real X3, Real X4, Real X4);
This function draws an elliptical arc.
The outline uses the current pen, and the shape is filled with the current brush.
Argument list:
Argument0: Device Context Handle
Argument1: x-coord of rectangle's upper-left corner
Argument2: y-coord of rectangle's upper-left corner
Argument3: x-coord of rectangle's lower-right corner
Argument4: y-coord of rectangle's lower-right corner
Argument5: x-coord of first radial ending point
Argument6: y-coord of first radial ending point
Argument7: x-coord of second radial ending point
Argument8: y-coord of second radial ending point
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_Chord (Real DC Handle, Real X1, Real X1, Real X2, Real X2, Real X3, Real X3, Real X4, Real X4);
This function draws a chord (a region bounded by the intersection of an ellipse and a line segment, called a secant).
The outline uses the current pen, and the shape is filled with the current brush.
Argument list:
Argument0: Device Context Handle
Argument1: x-coord of rectangle's upper-left corner
Argument2: y-coord of rectangle's upper-left corner
Argument3: x-coord of rectangle's lower-right corner
Argument4: y-coord of rectangle's lower-right corner
Argument5: x-coord of first radial ending point
Argument6: y-coord of first radial ending point
Argument7: x-coord of second radial ending point
Argument8: y-coord of second radial ending point
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_Pie (Real DC Handle, Real X1, Real X1, Real X2, Real X2, Real X3, Real X3, Real X4, Real X4);
This function draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials.
The outline uses the current pen, and the shape is filled with the current brush.
Argument list:
Argument0: Device Context Handle
Argument1: x-coord of rectangle's upper-left corner
Argument2: y-coord of rectangle's upper-left corner
Argument3: x-coord of rectangle's lower-right corner
Argument4: y-coord of rectangle's lower-right corner
Argument5: x-coord of first radial ending point
Argument6: y-coord of first radial ending point
Argument7: x-coord of second radial ending point
Argument8: y-coord of second radial ending point
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_RoundRect (Real DC Handle, Real X1, Real X1, Real X2, Real X2, Real Ellipse Width, Real Ellipse Height);
This function draws a rectangle with rounded corners.
The outline uses the current pen, and the shape is filled with the current brush.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_Line (Real DC Handle, Real X1, Real X1, Real X2, Real X2, Real);
This function draws a line.
The outline uses the current pen, and the shape is filled with the current brush.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_SetBkTransparent (Real DC Handle, Real Is Transparent);
This function enables or disables background transparency for drawing.
Drawing text, for example, will not include a box around the text.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_SetBkColor (Real DC Handle, Real Color);
This function changes the background color for drawing.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_SetPenColor (Real DC Handle, Real Color);
This function changes the pen color.
This function requires Windows 2000 or higher.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_SetBrushColor (Real DC Handle, Real Color);
This function changes the brush color.
This function requires Windows 2000 or higher.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_SetTextColor (Real DC Handle, Real Color);
This function changes the text color.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_Ellipse (Real DC Handle,Real X1, Real X1, Real X2, Real X2);
This function draws an ellipse.
The outline uses the current pen, and the shape is filled with the current brush.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_Rectangle (Real DC Handle,Real X1, Real X1, Real X2, Real X2);
This function draws a rectangle.
The outline uses the current pen, and the shape is filled with the current brush.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_Copy (Real Destination DC Handle,Real Source DC Handle, Real Destination X, Real Destination Y, Real Destination Width, Real Destination Height, Real Source X, Real Source Y);
This function copies an image from the source DC to the destionation DC.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_StretchCopy (Real Destination DC Handle,Real Source DC Handle, Real Destination X, Real Destination Y, Real Destination Width, Real Destination Height, Real Source X, Real Source Y, Real Source Width, Real Source Height);
This function copies an image from the source DC to the destionation DC and stretches it to the destination dimensions.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_TransparentCopy (Real Destination DC Handle,Real Source DC Handle, Real Transparency Color, Real Destination X, Real Destination Y, Real Destination Width, Real Destination Height, Real Source X, Real Source Y, Real Source Width, Real Source Height);
This function copies an image (except for all the pixels that have the transparency color) from the source DC to the destionation DC and stretches it to the destination dimensions.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_GetTextWidth (Real DC Handle,String Text);
This function calculates the width in pixels of a string using the current font in a DC.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_GetTextHeight (Real DC Handle,String Text);
This function calculates the height in pixels of a string using the current font in a DC.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_TextOut (Real DC Handle,Real X, Real Y, String Text);
This function draws text into a DC using the current selected font.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_SetDrawText (Real X2, Real Y2, Real Formatting Flags, Real Tab Length, Real Left Margin, Real Right Margin);
This function prepares settings before an API_Draw_DrawText call.
argument2 uses the Text Formatting Flags.
Return value:
Always returns 1.
Real API_Draw_DrawText (Real DC Handle, Real X, Real Y, String Text);
This function draws text which can be formatted in a certain area (between X,Y and X2,Y2).
You need to call API_Draw_SetDrawText to set the additional settings.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_FillRect (Real DC Handle,Real Brush Resource Handle, Real X, Real Y, Real X2, Real Y2);
This function fills a rectangle with a brush.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Real API_Draw_Gradient (Real DC Handle,Real X, Real Y, Real X2, Real Y2, Real Direction, Real Color 1, Real Color 2);
This function makes a gradient of two colors.
Set argument5 to 0 to get a horizontal gradient, set it to 1 to make a vertical gradient.
This function requires Windows 2000 or higher.
Return value:
Returns true (1) when succesful, or false (0) when failed.
Return to help index
|
|
|
|