Functions for Drawing on a Device Context

BT_DrawGetPixel(hDC, Row, Col)

Gets RGB color value of the pixel at the specified coordinates to the Device Context (DC) specified and returns a array with the color = {R,G,B}.

hDC: is a handle to the device context.

Row, Col: specifies the coordinates in pixels in the DC.


BT_DrawSetPixel(hDC, Row, Col, aRGBcolor)

Sets RGB color value of the pixel at the specified coordinates to the Device Context (DC) specified.

hDC: is a handle to the device context.

Row, Col: specifies the coordinates in pixels in the DC.

aRGBcolor: is a array with the RGB color = {R,G,B}.


BT_DrawBitmap(hDC, Row, Col, Width, Height, Mode_Stretch, hBitmap)

Draws a bitmap in the Device Context (DC) specified.

hDC: is a handle to the device context.

Row, Col, Width, Height: specifies the size of the rectangle in pixels in the DC where you will draw the bitmap. For default: Row = 0, Col = 0, Width = BT_BitmapWidth(hBitmap), Height = BT_BitmapHeight(hBitmap).

Mode_Stretch: sets the mode as the bitmap is adjusts (is stretches or compresses) in the specified rectangle in the DC, it is one of the constants: BT_SCALE, BT_STRETCH or BT_COPY (defined in BosTaurus.CH).

hBitmap: is a handle to the bitmap.


BT_DrawBitmapTransparent(hDC, Row, Col, Width, Height, Mode_Stretch, hBitmap, aRGBcolor_transp)

Draws a transparent bitmap in the Device Context (DC) specified.

hDC: is a handle to the device context.

Row, Col, Width, Height: specifies the size of the rectangle in pixels in the DC where you will draw the bitmap. For default: Row = 0, Col = 0, Width = BT_BitmapWidth(hBitmap), Height = BT_BitmapHeight(hBitmap).

Mode_Stretch: sets the mode as the bitmap is adjusts (is stretches or compresses) in the specified rectangle in the DC, it is one of the constants: BT_SCALE, BT_STRETCH or BT_COPY (defined in BosTaurus.CH).

hBitmap: is a handle to the bitmap.

aRGBcolor_transp: array containing the RGB colors to treat as transparent in the bitmap. For default: aRGBcolor_transp = color of the first pixel of the origin bitmap.


BT_DrawBitmapAlphaBlend(hDC, Row, Col, Width, Height, Alpha, Mode_Stretch, hBitmap)

Draw a bitmap with Alpha Blend effect (that make the pixels to be transparent or semi transparent) in the Device Context (DC) specified.

hDC: is a handle to the device context.

Row, Col, Width, Height: specifies the size of the rectangle in pixels in the DC where you will draw the bitmap. For default: Row = 0, Col = 0, Width = BT_BitmapWidth(hBitmap), Height = BT_BitmapHeight(hBitmap).

Alpha: is alpha blending value to be applied to the entire source bitmap (range 0 to 255, transparent = 0, opaque = 255).

Mode_Stretch: sets the mode as the bitmap is adjusts (is stretches or compresses) in the specified rectangle in the DC, it is one of the constants: BT_SCALE, BT_STRETCH or BT_COPY (defined in BosTaurus.CH).

hBitmap: is a handle to the bitmap.


BT_DrawDCtoDC(hDC1, Row1, Col1, Width1, Height1, Mode_Stretch, hDC2, Row2, Col2, Width2, Height2)

Copy a rectangular area of a device context (origin) in another device context (destination).

hDC1: is a handle to the destination device context.

Row1, Col1, Width1, Height1: specifies the size of the rectangle in pixels in the destination DC where you will copy the origin DC.

Mode_Stretch: sets the mode as the rectangle in the origin DC is adjusts (is stretches or compresses) in the specified rectangle in the destination DC, it is one of the constants: BT_SCALE, BT_STRETCH or BT_COPY (defined in BosTaurus.CH).

hDC2: is a handle to the origin device context.

Row2, Col2, Width2, Height2: specifies the size of the rectangle in pixels in the origin DC to copied in the destination DC.


BT_DrawDCtoDCTransparent(hDC1, Row1, Col1, Width1, Height1, Mode_Stretch, hDC2, Row2, Col2, Width2, Height2, aRGBcolor_transp)

Copy a transparent rectangular area of a device context (origin) in another device context (destination).

hDC1: is a handle to the destination device context.

Row1, Col1, Width1, Height1: specifies the size of the rectangle in pixels in the destination DC where you will copy the origin DC.

Mode_Stretch: sets the mode as the rectangle in the origin DC is adjusts (is stretches or compresses) in the specified rectangle in the destination DC, it is one of the constants: BT_SCALE, BT_STRETCH or BT_COPY (defined in BosTaurus.CH).

hDC2: is a handle to the origin device context.

Row2, Col2, Width2, Height2: specifies the size of the rectangle in pixels in the origin DC to copied in the destination DC.

aRGBcolor_transp: array containing the RGB colors to treat as transparent in the origin DC. For default: aRGBcolor_transp = color of the first pixel of the origin DC.


BT_DrawDCtoDCAlphaBlend(hDC1, Row1, Col1, Width1, Height1, Alpha, Mode_Stretch, hDC2, Row2, Col2, Width2, Height2)

Copy a rectangular area of a device context (origin) with Alpha Blend effect (that make the pixels to be transparent or semi transparent) in another device context (destination).

hDC1: is a handle to the destination device context.

Row1, Col1, Width1, Height1: specifies the size of the rectangle in pixels in the destination DC where you will copy the origin DC.

Alpha: is alpha blending value to be applied to the entire source bitmap (range 0 to 255, transparent = 0, opaque = 255).

Mode_Stretch: sets the mode as the rectangle in the origin DC is adjusts (is stretches or compresses) in the specified rectangle in the destination DC, it is one of the constants: BT_SCALE, BT_STRETCH or BT_COPY (defined in BosTaurus.CH).

hDC2: is a handle to the origin device context.

Row2, Col2, Width2, Height2: specifies the size of the rectangle in pixels in the origin DC to copied in the destination DC.


BT_DrawGradientFillHorizontal(hDC, Row, Col, Width, Height, aColorRGBstart, aColorRGBend)

Fill a rectangular region from left to right (horizontal) in a Device Context (DC) with a background color that is interpolated from two colors specified.

hDC: is a handle to the device context.

Row, Col, Width, Height: specifies the size of the rectangle in pixels in the DC where it will be filled.

aColorRGBstart: array that contains the RGB colors with that will begin filling. For default: aColorRGBstart = {0,0,0} = BLACK

aColorRGBend: array that contains the RGB colors with that will end filling. For default: aColorRGBend = {255,255,255} = WHITE


BT_DrawGradientFillVertical(hDC, Row, Col, Width, Height, aColorRGBstart, aColorRGBend)

Fill a rectangular region from top to bottom (vertical) in a Device Context (DC) with a background color that is interpolated from two colors specified.

hDC: is a handle to the device context.

Row, Col, Width, Height: specifies the size of the rectangle in pixels in the DC where it will be filled.

aColorRGBstart: array that contains the RGB colors with that will begin filling. For default: aColorRGBstart = {255,255,255} = WHITE

aColorRGBend: array that contains the RGB colors with that will end filling. For default: aColorRGBend = {0,0,0} = BLACK


BT_DrawText(hDC, Row, Col, cText, cFontName, nFontSize, aFontColor, aBackColor, nTypeText, nAlingText, nOrientation)

Write a character string in the Device Context (DC) specified.

hDC: is a handle to the device context.

Row, Col: specifies the coordinates in pixels in the DC.

cText: is the text to draw.

cFontName: is the name of the font, e.g. “Times New Roman”

nFontSize: is the size of the font in logical units, e.g. 12.

aFontColor: array that contains the RGB colors that set the text color. For default aFontColor = {0,0,0} = BLACK

aBackColor: array that contains the RGB colors that set the background text color. For default aBackColor = {255,255,255} = WHITE

nTypeText: sets if background fills (opaque) or not (transparent) with the BackColor color before the text it draws, it is one of the constants: BT_TEXT_OPAQUE or BT_TEXT_TRANSPARENT (defined in BosTaurus.CH). The characteristic of the font is set with one of the following constants: BT_TEXT_BOLD, BT_TEXT_ITALIC, BT_TEXT_UNDERLINE, BT_TEXT_STRIKEOUT. For default: nTypeText = BT_TEXT_OPAQUE.

nAlingText: sets the horizontal and vertical alignment of the text with respect of specified coordinates in Col and Row respectively. The horizontal alignment is set with one of the following constants: BT_TEXT_LEFT, BT_TEXT_CENTER or BT_TEXT_RIGHT (defined in BosTaurus.CH). The vertical alignment is set with one of the following constants: BT_TEXT_TOP, BT_TEXT_BASELINE or BT_TEXT_BOTTOM (defined in BosTaurus.CH). For default nAlingText = BT_TEXT_LEFT + BT_TEXT_TOP

nOrientation: sets the orientation of the text with respect of specified coordinates in Col and Row (range -90 to +90º). In BosTaurus.CH is defines some constants: BT_TEXT_NORMAL_ORIENTATION, BT_TEXT_VERTICAL_ASCENDANT, BT_TEXT_VERTICAL_DESCENDANT, BT_TEXT_DIAGONAL_ASCENDANT, BT_TEXT_DIAGONAL_DESCENDANT. For default nOrientation = BT_TEXT_NORMAL_ORIENTATION.


BT_DrawTextEx(hDC, Row, Col, Width, Height, cText, cFontName, nFontSize, aFontColor, aBackColor, nTypeText, nAlignText, nOrientation)

Write a character string in a given rectangle in the Device Context (DC) specified.

hDC: is a handle to the device context.

Row, Col, Width, Height: specifies the size of the rectangle in pixels in the DC where it will be written.

cText: is the text to draw.

cFontName: is the name of the font, e.g. “Times New Roman”

nFontSize: is the size of the font in logical units, e.g. 12.

aFontColor: array that contains the RGB colors that set the text color. For default aFontColor = {0,0,0} = BLACK

aBackColor: array that contains the RGB colors that set the background text color. For default aBackColor = {255,255,255} = WHITE

nTypeText: sets if background fills (opaque) or not (transparent) with the BackColor color before the text it draws, it is one of the constants: BT_TEXT_OPAQUE or BT_TEXT_TRANSPARENT (defined in BosTaurus.CH). The characteristic of the font is set with one of the following constants: BT_TEXT_BOLD, BT_TEXT_ITALIC, BT_TEXT_UNDERLINE, BT_TEXT_STRIKEOUT. For default: nTypeText = BT_TEXT_OPAQUE.

nAlignText: sets the horizontal and vertical alignment of the text with respect of specified coordinates in Col and Row respectively. The horizontal alignment is set with one of the following constants: BT_TEXT_LEFT, BT_TEXT_CENTER or BT_TEXT_RIGHT (defined in BosTaurus.CH). The vertical alignment is set with one of the following constants: BT_TEXT_TOP, BT_TEXT_BASELINE or BT_TEXT_BOTTOM (defined in BosTaurus.CH). For default nAlingText = BT_TEXT_LEFT + BT_TEXT_TOP

nOrientation: sets the orientation of the text with respect of specified coordinates in Col and Row (range -90 to +90º). In BosTaurus.CH is defines some constants: BT_TEXT_NORMAL_ORIENTATION, BT_TEXT_VERTICAL_ASCENDANT, BT_TEXT_VERTICAL_DESCENDANT, BT_TEXT_DIAGONAL_ASCENDANT, BT_TEXT_DIAGONAL_DESCENDANT. For default nOrientation = BT_TEXT_NORMAL_ORIENTATION.


BT_DrawTextSize(hDC, cText, cFontName, nFontSize, nTypeText)

Gets the size in pixels of a string of characters for the Device Context (DC) specified and returns an array with six elements: { nTextWidth, nTextHeight, A+B+C of first character, A, B, C }.

Where: A spacing is the distance added to the current position before placing the glyph. B spacing is the width of the black part of the glyph. C spacing is the distance added to the current position to provide white space to the right of the glyph. The total advanced width is specified by A+B+C.

hDC: is a handle to the device context.

cText: is the text to get size.

cFontName: is the name of the font, e.g. “Times New Roman”

nFontSize: is the size of the font in logical units, e.g. 12.

nTypeText: is the characteristic of the font (BT_TEXT_BOLD, BT_TEXT_ITALIC, BT_TEXT_UNDERLINE, BT_TEXT_STRIKEOUT).


BT_DrawPolyLine(hDC, aPointY, aPointX, aColorRGBLine, nWidthLine)

Draws a series of line segments by connecting the points the arrays specified.

hDC: is a handle to the device context.

aPointY: array containing the coordinates in pixels of the points on the y-axis.

aPointX: array containing the coordinates in pixels of the points on the x-axis.

aColorRGBLine: array that contains the RGB colors that set of the lines color.

nWidthLine: width in pixels of the lines. For default: nWidthLine = 1.


BT_DrawPolygon(hDC, aPointY, aPointX, aColorRGBLine, nWidthLine, aColorRGBFill)

Draws a polygon consisting of two or more vertices connected by straight lines.

hDC: is a handle to the device context.

aPointY: array containing the coordinates in pixels of the points on the y-axis.

aPointX: array containing the coordinates in pixels of the points on the x-axis.

aColorRGBLine: array that contains the RGB colors that set of the lines color.

nWidthLine: width in pixels of the lines. For default: nWidthLine = 1.

aColorRGBFill: array that contains the RGB colors that set of the fill color.


BT_DrawPolyBezier(hDC, aPointY, aPointX, aColorRGBLine, nWidthLine)

Draws one or more Bézier curves.

hDC: is a handle to the device context.

aPointY: array containing the coordinates in pixels of the points on the y-axis.

aPointX: array containing the coordinates in pixels of the points on the x-axis.

aColorRGBLine: array that contains the RGB colors that set of the lines color.

nWidthLine: width in pixels of the lines. For default: nWidthLine = 1.


BT_DrawArc(hDC, Row1, Col1, Row2, Col2, RowStartArc, ColStartArc, RowEndArc, ColEndArc, aColorRGBLine, nWidthLine)

Draws an elliptical arc.

hDC: is a handle to the device context.

Row1, Col1: specifies the upper-left corner of the bounding rectangle in pixels.

Row2, Col2: specifies the lower-right corner of the bounding rectangle in pixels.

_RowStartArc, ColStartArc: _specifies the ending point of the radial line defining the starting point of the arc in pixels.

RowEndArc, ColEndArc: specifies the ending point of the radial line defining the ending point of the arc in pixels.

aColorRGBLine: array that contains the RGB colors that set of the line color.

nWidthLine: width in pixels of the line. For default: nWidthLine = 1.


BT_DrawChord(hDC, Row1, Col1, Row2, Col2, RowStartArc, ColStartArc, RowEndArc, ColEndArc, aColorRGBLine, nWidthLine, aColorRGBFill)

Draws a chord (a region bounded by the intersection of an ellipse and a line segment, called a secant).

hDC: is a handle to the device context.

Row1, Col1: specifies the upper-left corner of the bounding rectangle in pixels.

Row2, Col2: specifies the lower-right corner of the bounding rectangle in pixels.

_RowStartArc, ColStartArc: _specifies the ending point of the radial line defining the starting point of the chord in pixels.

RowEndArc, ColEndArc: specifies the ending point of the radial line defining the ending point of the chord in pixels.

aColorRGBLine: array that contains the RGB colors that set of the line color.

nWidthLine: width in pixels of the line. For default: nWidthLine = 1.

aColorRGBFill: array that contains the RGB colors that set of the fill color.


BT_DrawPie(hDC, Row1, Col1, Row2, Col2, RowStartArc, ColStartArc, RowEndArc, ColEndArc, aColorRGBLine, nWidthLine, aColorRGBFill)

Draws a pie-shaped wedge bounded by the intersection of an ellipse and two radials.

hDC: is a handle to the device context.

Row1, Col1: specifies the upper-left corner of the bounding rectangle in pixels.

Row2, Col2: specifies the lower-right corner of the bounding rectangle in pixels.

_RowStartArc, ColStartArc: _specifies the endpoint of the first radial in pixels.

RowEndArc, ColEndArc: specifies the endpoint of the second radial in pixels.

aColorRGBLine: array that contains the RGB colors that set of the line color.

nWidthLine: width in pixels of the line. For default: nWidthLine = 1.

aColorRGBFill: array that contains the RGB colors that set of the fill color.


BT_DrawLine(hDC, Row1, Col1, Row2, Col2, aColorRGBLine, nWidthLine)

Draw a line by connecting two points specified.

hDC: is a handle to the device context.

Row1, Col1: are the coordinates in pixels of the starting point.

Row2, Col2: are the coordinates in pixels of the end point.

aColorRGBLine: array that contains the RGB colors that set of the line color.

nWidthLine: width in pixels of the line. For default: nWidthLine = 1.


BT_DrawRectangle(hDC, Row, Col, Width, Height, aColorRGBLine, nWidthLine)

Draw a rectangle with the specified dimensions.

hDC: is a handle to the device context.

Row, Col, Width, Height: specifies the dimensions in pixels of the rectangle to be draw.

aColorRGBLine: array that contains the RGB colors that set of the lines color.

nWidthLine: width in pixels of the lines. For default: nWidthLine = 1.


BT_DrawEllipse(hDC, Row1, Col1, Width, Height, aColorRGBLine, nWidthLine)

Draw an ellipse with the specified dimensions.

hDC: is a handle to the device context.

Row, Col, Width, Height: specifies the dimensions in pixels of the ellipse to be draw.

aColorRGBLine: array that contains the RGB colors that set of the line color.

nWidthLine: width in pixels of the line. For default: nWidthLine = 1.


BT_DrawFillRectangle(hDC, Row, Col, Width, Height, aColorRGBFill, aColorRGBLine, nWidthLine)

Draw a fill rectangle with the specified dimensions.

hDC: is a handle to the device context.

Row, Col, Width, Height: specifies the dimensions in pixels of the rectangle to be draw.

aColorRGBFill: array that contains the RGB colors that set of the fill color.

aColorRGBLine: array that contains the RGB colors that set of the lines color. For default: aColorRGBLine = aColorRGBFill.

nWidthLine: width in pixels of the lines. For default: nWidthLine = 1.


BT_DrawFillEllipse(hDC, Row, Col, Width, Height, aColorRGBFill, aColorRGBLine, nWidthLine)

Draw a fill ellipse with the specified dimensions.

hDC: is a handle to the device context.

Row, Col, Width, Height: specifies the dimensions in pixels of the ellipse to be draw.

aColorRGBFill: array that contains the RGB colors that set of the fill color.

aColorRGBLine: array that contains the RGB colors that set of the line color. For default: aColorRGBLine = aColorRGBFill.

nWidthLine: width in pixels of the line. For default: nWidthLine = 1.


BT_DrawFillRoundRect(hDC, Row, Col, Width, Height, RoundWidth, RoundHeight, aColorRGBFill, aColorRGBLine, nWidthLine)

Draw a fill rectangle with rounded corners.

hDC: is a handle to the device context.

Row, Col, Width, Height: specifies the dimensions in pixels of the rectangle to be draw.

RoundWidth: specifies the width in pixels of the ellipse used to draw the rounded corners.

RoundHeight: specifies the height in pixels of the ellipse used to draw the rounded corners.

aColorRGBFill: array that contains the RGB colors that set of the fill color.

aColorRGBLine: array that contains the RGB colors that set of the line color. For default: aColorRGBLine = aColorRGBFill.

nWidthLine: width in pixels of the line. For default: nWidthLine = 1.


BT_DrawFillFlood(hDC, Row, Col, aColorRGBFill)

Fill an area in all directions defined by the color of the point of the specified coordinates.

hDC: is a handle to the device context.

Row, Col: specifies the coordinates in pixels of the point where begin filling.

aColorRGBFill: array that contains the RGB colors that set of the fill color.


results matching ""

    No results matching ""