Skip to content

Graphics

Functions

Draw Circle

Draw Circle

Draw a circle on the current window. The circle is centred on its x, y coordinates, and has the provided radius.

Parameters:

NameTypeDescription
clrColorThe color of the circle
cCircleThe circle being drawn

Signatures:

void draw_circle(color clr, const circle &c)

Draw Circle

Draw a circle with the provided drawing options, which may include options related to the drawing destination.

Parameters:

NameTypeDescription
clrColorThe color of the circle
cCircleThe circle being drawn
optsDrawing OptionsDrawing options to configure the drawing operation

Signatures:

void draw_circle(color clr, const circle &c, drawing_options opts)

Draw Circle

Draw a circle onto the current window. The circle is centred on its x, y coordinates, and has the provided radius.

Parameters:

NameTypeDescription
clrColorThe color of the circle
xDoubleThe x location of the circle
yDoubleThe y location of the circle
radiusDoubleThe radius of the circle

Signatures:

void draw_circle(color clr, double x, double y, double radius)

Draw Circle

Draw a circle using the supplied drawing options. The circle is centred on its x, y coordinates, and has the provided radius. This will use Drawing Options to determine the destination.

Parameters:

NameTypeDescription
clrColorThe color of the circle
xDoubleThe x location of the circle
yDoubleThe y location of the circle
radiusDoubleThe radius of the circle
optsDrawing OptionsDrawing options to configure the drawing operation

Signatures:

void draw_circle(color clr, double x, double y, double radius, drawing_options opts)

Draw Circle On Bitmap

Draw Circle On Bitmap

Draw a circle onto the destination bitmap. The circle is centred on its x, y coordinates, and has the provided radius.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the circle
xDoubleThe x location of the circle
yDoubleThe y location of the circle
radiusDoubleThe radius of the circle

Signatures:

void draw_circle_on_bitmap(bitmap destination, color clr, double x, double y, double radius)

Draw Circle On Bitmap

Draw a circle to the bitmap using the supplied drawing options. The circle is centred on its x, y coordinates, and has the provided radius.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the circle
xDoubleThe x location of the circle
yDoubleThe y location of the circle
radiusDoubleThe radius of the circle
optsDrawing OptionsDrawing options to configure the drawing operation

Signatures:

void draw_circle_on_bitmap(bitmap destination, color clr, double x, double y, double radius, drawing_options opts)

Draw Circle On Window

Draw Circle On Window

Draw a circle onto the destination window. The circle is centred on its x, y coordinates, and has the provided radius.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color of the circle
xDoubleThe x location of the circle
yDoubleThe y location of the circle
radiusDoubleThe radius of the circle

Signatures:

void draw_circle_on_window(window destination, color clr, double x, double y, double radius)

Draw Circle On Window

Draw a circle to the window using the supplied drawing options. The circle is centred on its x, y coordinates, and has the provided radius.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color of the circle
xDoubleThe x location of the circle
yDoubleThe y location of the circle
radiusDoubleThe radius of the circle
optsDrawing OptionsDrawing options to configure the drawing operation

Signatures:

void draw_circle_on_window(window destination, color clr, double x, double y, double radius, drawing_options opts)

Fill Circle

Fill Circle

Draw a circle on the current window. The circle is centred on its x, y coordinates, and has the provided radius.

Parameters:

NameTypeDescription
clrColorThe color of the circle
cCircleThe circle being drawn

Signatures:

void fill_circle(color clr, const circle &c)

Fill Circle

Fill a circle with the provided drawing options, which may include options related to the drawing destination.

Parameters:

NameTypeDescription
clrColorThe color of the circle
cCircleThe circle being drawn
optsDrawing OptionsDrawing options to configure the drawing operation

Signatures:

void fill_circle(color clr, const circle &c, drawing_options opts)

Fill Circle

Fill a circle onto the current window. The circle is centred on its x, y coordinates, and has the provided radius.

Parameters:

NameTypeDescription
clrColorThe color of the circle
xDoubleThe x location of the circle
yDoubleThe y location of the circle
radiusDoubleThe radius of the circle

Signatures:

void fill_circle(color clr, double x, double y, double radius)

Fill Circle

Fill a circle using the supplied drawing options. The circle is centred on its x, y coordinates, and has the provided radius. This will use Drawing Options to determine the destination.

Parameters:

NameTypeDescription
clrColorThe color of the circle
xDoubleThe x location of the circle
yDoubleThe y location of the circle
radiusDoubleThe radius of the circle
optsDrawing OptionsDrawing options to configure the drawing operation

Signatures:

void fill_circle(color clr, double x, double y, double radius, drawing_options opts)

Fill Circle On Bitmap

Fill Circle On Bitmap

Fill a circle onto the destination bitmap. The circle is centred on its x, y coordinates, and has the provided radius.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the circle
xDoubleThe x location of the circle
yDoubleThe y location of the circle
radiusDoubleThe radius of the circle

Signatures:

void fill_circle_on_bitmap(bitmap destination, color clr, double x, double y, double radius)

Fill Circle On Bitmap

Fill a circle to the bitmap using the supplied drawing options. The circle is centred on its x, y coordinates, and has the provided radius.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the circle
xDoubleThe x location of the circle
yDoubleThe y location of the circle
radiusDoubleThe radius of the circle
optsDrawing OptionsDrawing options to configure the drawing operation

Signatures:

void fill_circle_on_bitmap(bitmap destination, color clr, double x, double y, double radius, drawing_options opts)

Fill Circle On Window

Fill Circle On Window

Fill a circle onto the destination window. The circle is centred on its x, y coordinates, and has the provided radius.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color of the circle
xDoubleThe x location of the circle
yDoubleThe y location of the circle
radiusDoubleThe radius of the circle

Signatures:

void fill_circle_on_window(window destination, color clr, double x, double y, double radius)

Fill Circle On Window

Fill a circle to the window using the supplied drawing options. The circle is centred on its x, y coordinates, and has the provided radius.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color of the circle
xDoubleThe x location of the circle
yDoubleThe y location of the circle
radiusDoubleThe radius of the circle
optsDrawing OptionsDrawing options to configure the drawing operation

Signatures:

void fill_circle_on_window(window destination, color clr, double x, double y, double radius, drawing_options opts)

Current Clip

Current Clip

Returns the rectangle of the current clip area for the current window

Return Type: Rectangle

Signatures:

rectangle current_clip()

Current Clip

Returns the rectangle of the current clip area for a bitmap

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to get the clipping rectangle from

Return Type: Rectangle

Signatures:

rectangle current_clip(bitmap bmp)

Current Clip

Returns the rectangle of the current clip area for a window

Parameters:

NameTypeDescription
wndWindowThe window to get the clipping rectangle from

Return Type: Rectangle

Signatures:

rectangle current_clip(window wnd)

Pop Clip

Pop Clip

Remove the last clipping rectangle pushed to the window. This will then apply the previously pushed clipping rectangle.

Parameters:

NameTypeDescription
wndWindowThe window to change

Signatures:

void pop_clip(window wnd)

Pop Clip

Remove the last clipping rectangle pushed to the current window. This will then apply the previously pushed clipping rectangle.

Signatures:

void pop_clip()

Pop Clip

Remove the last clipping rectangle pushed to the bitmap. This will then apply the previously pushed clipping rectangle.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to change

Signatures:

void pop_clip(bitmap bmp)

Push Clip

Push Clip

Add the clipping rectangle of a window and uses the intersect between the new rectangle and previous clip. When a clipping rectangle is provided, drawing operations will only affect the area specified in the current clipping rectangle.

Parameters:

NameTypeDescription
wndWindowThe window to add clipping to
rRectangleThe new clipping rectangle

Signatures:

void push_clip(window wnd, const rectangle &r)

Push Clip

Add the clipping rectangle of a bitmap and uses the intersect between the new rectangle and previous clip. When a clipping rectangle is provided, drawing operations will only affect the area specified in the current clipping rectangle.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to add clipping to
rRectangleThe new clipping rectangle

Signatures:

void push_clip(bitmap bmp, const rectangle &r)

Push Clip

Push a clip rectangle to the current window. The resulting clipping rectangle will be the intersection of the existing clipping rectangle with the new rectangle provided in this call. This can be undone using Pop Clip. When a clipping rectangle is provided, drawing operations will only affect the area specified in the current clipping rectangle.

Parameters:

NameTypeDescription
rRectangleThe new clipping rectangle

Signatures:

void push_clip(const rectangle &r)

Reset Clip

Reset Clip

Reset the clipping rectangle on a bitmap. This will clear all of the clipping rectangles pushed to the bitmap.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to clear the clipping rectangle

Signatures:

void reset_clip(bitmap bmp)

Reset Clip

Reset the clipping rectangle of the current window. This will clear all of the clipping rectangles pushed to the current window.

Signatures:

void reset_clip()

Reset Clip

Reset the clipping rectangle on a window. This will clear all of the clipping rectangles pushed to the window.

Parameters:

NameTypeDescription
wndWindowThe window to clear the clipping rectangle

Signatures:

void reset_clip(window wnd)

Set Clip

Set Clip

Set the clip rectangle of the current window. This will clear any existing clipping rectangles pushed to the current window, and use the supplied rectangle for clipping.

Parameters:

NameTypeDescription
rRectangleThe new clipping rectangle

Signatures:

void set_clip(const rectangle &r)

Set Clip

Set the clip rectangle of the bitmap. This will clear any existing clipping rectangles pushed to the bitmap, and use the supplied rectangle for clipping.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to change
rRectangleThe new clipping rectangle

Signatures:

void set_clip(bitmap bmp, const rectangle &r)

Set Clip

Set the clip rectangle of the window. This will clear any existing clipping rectangles pushed to the window, and use the supplied rectangle for clipping.

Parameters:

NameTypeDescription
wndWindowThe window to change
rRectangleThe new clipping rectangle

Signatures:

void set_clip(window wnd, const rectangle &r)

Option Defaults

Returns a Drawing Options with default values. This will draw to the current window, with default scale of 1, no rotation or offset, not flipped, drawing whole images, with default camera mechanisms and line width.

Return Type: Drawing Options

Signatures:

drawing_options option_defaults()

Option Draw To

Option Draw To

Use this option to draw to a Bitmap. Pass dest the Bitmap you want to draw on.

Parameters:

NameTypeDescription
destBitmapThe bitmap to draw to.

Return Type: Drawing Options

Signatures:

drawing_options option_draw_to(bitmap dest)

Option Draw To

Use this option to draw to a Bitmap. Pass dest the Bitmap you want to draw on. Pass opts the other options you want use.

Parameters:

NameTypeDescription
destBitmapThe bitmap to draw to.
optsDrawing OptionsValues for the other options.

Return Type: Drawing Options

Signatures:

drawing_options option_draw_to(bitmap dest, drawing_options opts)

Option Draw To

Use this option to draw to a specified Window. Pass dest the Window you want to draw on.

Parameters:

NameTypeDescription
destWindowThe window to draw onto.

Return Type: Drawing Options

Signatures:

drawing_options option_draw_to(window dest)

Option Draw To

Use this option to draw to a Bitmap. Pass dest the Bitmap you want to draw on to. Pass opts the other options you want use.

Parameters:

NameTypeDescription
destWindowThe window to draw onto.
optsDrawing OptionsValues for the other options.

Return Type: Drawing Options

Signatures:

drawing_options option_draw_to(window dest, drawing_options opts)

Option Flip X

Option Flip X

Use this option to flip an image along its X axis.

Return Type: Drawing Options

Signatures:

drawing_options option_flip_x()

Option Flip X

Use this option to flip an image along its X axis.

Parameters:

NameTypeDescription
optsDrawing OptionsValues for the other options.

Return Type: Drawing Options

Signatures:

drawing_options option_flip_x(drawing_options opts)

Option Flip Xy

Option Flip Xy

Use this option to flip the drawing of an image along both X and Y axis.

Return Type: Drawing Options

Signatures:

drawing_options option_flip_xy()

Option Flip Xy

Use this option to flip the drawing of an image along both X and Y axis.

Parameters:

NameTypeDescription
optsDrawing OptionsValues for the other options.

Return Type: Drawing Options

Signatures:

drawing_options option_flip_xy(drawing_options opts)

Option Flip Y

Option Flip Y

Use this option to flip the drawing of an image along its Y axis.

Return Type: Drawing Options

Signatures:

drawing_options option_flip_y()

Option Flip Y

Use this option to flip the drawing of an image along its Y axis.

Parameters:

NameTypeDescription
optsDrawing OptionsValues for the other options.

Return Type: Drawing Options

Signatures:

drawing_options option_flip_y(drawing_options opts)

Option Line Width

Option Line Width

Use this option to change the width of line drawings.

Parameters:

NameTypeDescription
widthIntegerThe new line width for line drawing.

Return Type: Drawing Options

Signatures:

drawing_options option_line_width(int width)

Option Line Width

Use this option to change the width of line drawings.

Parameters:

NameTypeDescription
widthIntegerThe new line width for line drawing.
optsDrawing OptionsValues for the other options.

Return Type: Drawing Options

Signatures:

drawing_options option_line_width(int width, drawing_options opts)

Option Part Bmp

Option Part Bmp

Use this option to draw only a part of a bitmap.

Parameters:

NameTypeDescription
xDoubleThe x coordinate of the part within the bitmap.
yDoubleThe y coordinate of the part within the bitmap.
wDoubleThe width of the part within the bitmap.
hDoubleThe height of the part within the bitmap.

Return Type: Drawing Options

Signatures:

drawing_options option_part_bmp(double x, double y, double w, double h)

Option Part Bmp

Use this option to draw only a part of a bitmap.

Parameters:

NameTypeDescription
xDoubleThe x coordinate of the part within the bitmap.
yDoubleThe y coordinate of the part within the bitmap.
wDoubleThe width of the part within the bitmap.
hDoubleThe height of the part within the bitmap.
optsDrawing OptionsValues for the other options.

Return Type: Drawing Options

Signatures:

drawing_options option_part_bmp(double x, double y, double w, double h, drawing_options opts)

Option Part Bmp

Use this option to draw only part of a bitmap.

Parameters:

NameTypeDescription
partRectangleThe rectangle of the part of the bitmap to draw.

Return Type: Drawing Options

Signatures:

drawing_options option_part_bmp(rectangle part)

Option Part Bmp

Use this option to draw only part of a bitmap.

Parameters:

NameTypeDescription
partRectangleThe rectangle of the part of the bitmap to draw.
optsDrawing OptionsValues for the other options.

Return Type: Drawing Options

Signatures:

drawing_options option_part_bmp(rectangle part, drawing_options opts)

Option Rotate Bmp

Option Rotate Bmp

Use this option to rotate a bitmap around its centre point.

Parameters:

NameTypeDescription
angleDoubleThe angle to rotate bitmaps.

Return Type: Drawing Options

Signatures:

drawing_options option_rotate_bmp(double angle)

Option Rotate Bmp

Use this option to rotate the drawing of a bitmap. This allows you to set the anchor point and rotate around that by a number of degrees. Pass opts the other options you want use.

Parameters:

NameTypeDescription
angleDoubleThe angle to rotate bitmaps.
anchor_xDoubleThe x location of the anchor within the bitmap
anchor_yDoubleThe y location of the anchor within the bitmap

Return Type: Drawing Options

Signatures:

drawing_options option_rotate_bmp(double angle, double anchor_x, double anchor_y)

Option Rotate Bmp

Use this option to rotate the drawing of a bitmap. This allows you to set the anchor point and rotate around that by a number of degrees. Pass opts the other options you want use.

Parameters:

NameTypeDescription
angleDoubleThe angle to rotate bitmaps.
anchor_xDoubleThe x location of the anchor within the bitmap
anchor_yDoubleThe y location of the anchor within the bitmap
optsDrawing OptionsValues for the other options.

Return Type: Drawing Options

Signatures:

drawing_options option_rotate_bmp(double angle, double anchor_x, double anchor_y, drawing_options opts)

Option Rotate Bmp

Use this option to rotate a bitmap around its centre point.

Parameters:

NameTypeDescription
angleDoubleThe angle to rotate bitmaps.
optsDrawing OptionsValues for the other options.

Return Type: Drawing Options

Signatures:

drawing_options option_rotate_bmp(double angle, drawing_options opts)

Option Scale Bmp

Option Scale Bmp

Use this option to scale the drawing of bitmaps. You can scale x and y separately.

Parameters:

NameTypeDescription
scale_xDoubleThe amount to scale bitmaps aalong the x axis
scale_yDoubleThe amount to scale bitmaps aalong the y axis

Return Type: Drawing Options

Signatures:

drawing_options option_scale_bmp(double scale_x, double scale_y)

Option Scale Bmp

Use this option to scale the drawing of bitmaps. You can scale x and y separately. Pass opts the other options you want use.

Parameters:

NameTypeDescription
scale_xDoubleThe amount to scale bitmaps aalong the x axis
scale_yDoubleThe amount to scale bitmaps aalong the y axis
optsDrawing OptionsValues for the other options.

Return Type: Drawing Options

Signatures:

drawing_options option_scale_bmp(double scale_x, double scale_y, drawing_options opts)

Option To Screen

Option To Screen

Use this option to draw to the screen, ignoring the positon of the camera.

Return Type: Drawing Options

Signatures:

drawing_options option_to_screen()

Option To Screen

Use this option to draw to the screen, ignoring the positon of the camera.

Parameters:

NameTypeDescription
optsDrawing OptionsValues for the other options.

Return Type: Drawing Options

Signatures:

drawing_options option_to_screen(drawing_options opts)

Option To World

Option To World

Use this option to draw in World coordinates — these are affected by the movement of the camera.

Return Type: Drawing Options

Signatures:

drawing_options option_to_world()

Option To World

Use this option to draw in World coordinates — these are affected by the movement of the camera.

Parameters:

NameTypeDescription
optsDrawing OptionsValues for the other options.

Return Type: Drawing Options

Signatures:

drawing_options option_to_world(drawing_options opts)

Option With Animation

Option With Animation

Use details from the animation to select an appropriate cell from the bitmaps being drawn.

Parameters:

NameTypeDescription
animAnimationThe animation with the cell details to be used.

Return Type: Drawing Options

Signatures:

drawing_options option_with_animation(animation anim)

Option With Animation

Use details from the animation to select an appropriate cell from the bitmaps being drawn. This extends the passed in drawing options with the animation details.

Parameters:

NameTypeDescription
animAnimationThe animation with the cell details to be used.
optsDrawing OptionsThe existing options to extend.

Return Type: Drawing Options

Signatures:

drawing_options option_with_animation(animation anim, drawing_options opts)

Option With Bitmap Cell

Option With Bitmap Cell

When drawing the bitmap this will only draw the cell. To use this the bitmap needs to have been provided with its cell details (see Bitmap Set Cell Details). This option overrides the animation or part drawing options.

Parameters:

NameTypeDescription
cellIntegerThe cell to draw from the bitmap (-1 for entire bitmap)

Return Type: Drawing Options

Signatures:

drawing_options option_with_bitmap_cell(int cell)

Option With Bitmap Cell

When drawing the bitmap this will only draw the cell. To use this the bitmap needs to have been provided with its cell details (see Bitmap Set Cell Details). This option overrides the animation or part drawing options. This extends the passed in drawing options with the cell details.

Parameters:

NameTypeDescription
cellIntegerThe cell to draw from the bitmap (-1 for entire bitmap)
optsDrawing OptionsThe existing options to extend.

Return Type: Drawing Options

Signatures:

drawing_options option_with_bitmap_cell(int cell, drawing_options opts)

Draw Ellipse

Draw Ellipse

Draws an ellipse using the provided location, and size.

Parameters:

NameTypeDescription
clrColorThe color of the ellipse
rectRectangleIndicates the location and size of the ellipse

Signatures:

void draw_ellipse(color clr, const rectangle rect)

Draw Ellipse

Draws an ellipse using the provided location, size, and drawing options. At this stage ellipse drawing is not affected by line width from the drawing options.

Parameters:

NameTypeDescription
clrColorThe color of the ellipse
rectRectangleIndicates the location and size of the ellipse
optsDrawing OptionsThe drawing options

Signatures:

void draw_ellipse(color clr, const rectangle rect, drawing_options opts)

Draw Ellipse

Draws an ellipse using the provided location, and size.

Parameters:

NameTypeDescription
clrColorThe color of the ellipse
xDoubleThe distance from the left of the bitmap or window to the left edge of the ellipse
yDoubleThe distance from the top of the bitmap or window to the top edge of the ellipse
widthDoubleThe width of the ellipse
heightDoubleThe height of the ellipse

Signatures:

void draw_ellipse(color clr, double x, double y, double width, double height)

Draw Ellipse

Draws an ellipse using the provided location, size, and drawing options. At this stage ellipse drawing is not affected by line width from the drawing options.

Parameters:

NameTypeDescription
clrColorThe color of the ellipse
xDoubleThe distance from the left of the bitmap or window to the left edge of the ellipse
yDoubleThe distance from the top of the bitmap or window to the top edge of the ellipse
widthDoubleThe width of the ellipse
heightDoubleThe height of the ellipse
optsDrawing OptionsThe drawing options

Signatures:

void draw_ellipse(color clr, double x, double y, double width, double height, drawing_options opts)

Draw Ellipse On Bitmap

Draw Ellipse On Bitmap

Draws an ellipse on the given bitmap, using the provided location, and size.

Parameters:

NameTypeDescription
destinationBitmapthe bitmap to draw the ellipse on
clrColorThe color of the ellipse
rectRectangleIndicates the location and size of the ellipse

Signatures:

void draw_ellipse_on_bitmap(bitmap destination, color clr, const rectangle rect)

Draw Ellipse On Bitmap

Draws an ellipse on the given bitmap, using the provided location, size, and drawing options. At this stage ellipse drawing is not affected by line width from the drawing options.

Parameters:

NameTypeDescription
destinationBitmapthe bitmap to draw the ellipse on
clrColorThe color of the ellipse
rectRectangleIndicates the location and size of the ellipse
optsDrawing OptionsThe drawing options

Signatures:

void draw_ellipse_on_bitmap(bitmap destination, color clr, const rectangle rect, drawing_options opts)

Draw Ellipse On Bitmap

Draws an ellipse on the given bitmap, using the provided location, and size.

Parameters:

NameTypeDescription
destinationBitmapthe bitmap to draw the ellipse on
clrColorThe color of the ellipse
xDoubleThe distance from the left of the bitmap or bitmap to the left edge of the ellipse
yDoubleThe distance from the top of the bitmap or bitmap to the top edge of the ellipse
widthDoubleThe width of the ellipse
heightDoubleThe height of the ellipse

Signatures:

void draw_ellipse_on_bitmap(bitmap destination, color clr, double x, double y, double width, double height)

Draw Ellipse On Bitmap

Draws an ellipse to the bitmap, using the provided location, size, and drawing options. At this stage ellipse drawing is not affected by line width from the drawing options.

Parameters:

NameTypeDescription
destinationBitmapthe bitmap to draw the ellipse on
clrColorThe color of the ellipse
xDoubleThe distance from the left of the bitmap or bitmap to the left edge of the ellipse
yDoubleThe distance from the top of the bitmap or bitmap to the top edge of the ellipse
widthDoubleThe width of the ellipse
heightDoubleThe height of the ellipse
optsDrawing OptionsThe drawing options

Signatures:

void draw_ellipse_on_bitmap(bitmap destination, color clr, double x, double y, double width, double height, drawing_options opts)

Draw Ellipse On Window

Draw Ellipse On Window

Draws an ellipse on the given window, using the provided location, and size.

Parameters:

NameTypeDescription
destinationWindowthe window to draw the ellipse on
clrColorThe color of the ellipse
rectRectangleIndicates the location and size of the ellipse

Signatures:

void draw_ellipse_on_window(window destination, color clr, const rectangle rect)

Draw Ellipse On Window

Draws an ellipse on the given window, using the provided location, size, and drawing options. At this stage ellipse drawing is not affected by line width from the drawing options.

Parameters:

NameTypeDescription
destinationWindowthe window to draw the ellipse on
clrColorThe color of the ellipse
rectRectangleIndicates the location and size of the ellipse
optsDrawing OptionsThe drawing options

Signatures:

void draw_ellipse_on_window(window destination, color clr, const rectangle rect, drawing_options opts)

Draw Ellipse On Window

Draws an ellipse on the given window, using the provided location, and size.

Parameters:

NameTypeDescription
destinationWindowthe window to draw the ellipse on
clrColorThe color of the ellipse
xDoubleThe distance from the left of the bitmap or window to the left edge of the ellipse
yDoubleThe distance from the top of the bitmap or window to the top edge of the ellipse
widthDoubleThe width of the ellipse
heightDoubleThe height of the ellipse

Signatures:

void draw_ellipse_on_window(window destination, color clr, double x, double y, double width, double height)

Draw Ellipse On Window

Draws an ellipse to the window, using the provided location, size, and drawing options. At this stage ellipse drawing is not affected by line width from the drawing options.

Parameters:

NameTypeDescription
destinationWindowthe window to draw the ellipse on
clrColorThe color of the ellipse
xDoubleThe distance from the left of the bitmap or window to the left edge of the ellipse
yDoubleThe distance from the top of the bitmap or window to the top edge of the ellipse
widthDoubleThe width of the ellipse
heightDoubleThe height of the ellipse
optsDrawing OptionsThe drawing options

Signatures:

void draw_ellipse_on_window(window destination, color clr, double x, double y, double width, double height, drawing_options opts)

Fill Ellipse

Fill Ellipse

Fill an ellipse using the provided location, and size.

Parameters:

NameTypeDescription
clrColorThe color of the ellipse
rectRectangleIndicates the location and size of the ellipse

Signatures:

void fill_ellipse(color clr, const rectangle rect)

Fill Ellipse

Fills an ellipse using the provided location, size, and drawing options. At this stage ellipse drawing is not affected by line width from the drawing options.

Parameters:

NameTypeDescription
clrColorThe color of the ellipse
rectRectangleIndicates the location and size of the ellipse
optsDrawing OptionsThe drawing options

Signatures:

void fill_ellipse(color clr, const rectangle rect, drawing_options opts)

Fill Ellipse

Fills an ellipse using the provided location, and size.

Parameters:

NameTypeDescription
clrColorThe color of the ellipse
xDoubleThe distance from the left of the bitmap or window to the left edge of the ellipse
yDoubleThe distance from the top of the bitmap or window to the top edge of the ellipse
widthDoubleThe width of the ellipse
heightDoubleThe height of the ellipse

Signatures:

void fill_ellipse(color clr, double x, double y, double width, double height)

Fill Ellipse

Fills an ellipse using the provided location, size, and drawing options.

Parameters:

NameTypeDescription
clrColorThe color of the ellipse
xDoubleThe distance from the left of the bitmap or window to the left edge of the ellipse
yDoubleThe distance from the top of the bitmap or window to the top edge of the ellipse
widthDoubleThe width of the ellipse
heightDoubleThe height of the ellipse
optsDrawing OptionsThe drawing options

Signatures:

void fill_ellipse(color clr, double x, double y, double width, double height, drawing_options opts)

Fill Ellipse On Bitmap

Fill Ellipse On Bitmap

Fill an ellipse on the given bitmap, using the provided location, and size.

Parameters:

NameTypeDescription
destinationBitmapthe bitmap to draw the ellipse on
clrColorThe color of the ellipse
rectRectangleIndicates the location and size of the ellipse

Signatures:

void fill_ellipse_on_bitmap(bitmap destination, color clr, const rectangle rect)

Fill Ellipse On Bitmap

Fills an ellipse on the given bitmap, using the provided location, size, and drawing options. At this stage ellipse drawing is not affected by line width from the drawing options.

Parameters:

NameTypeDescription
destinationBitmapthe bitmap to draw the ellipse on
clrColorThe color of the ellipse
rectRectangleIndicates the location and size of the ellipse
optsDrawing OptionsThe drawing options

Signatures:

void fill_ellipse_on_bitmap(bitmap destination, color clr, const rectangle rect, drawing_options opts)

Fill Ellipse On Bitmap

Fills an ellipse on the given bitmap, using the provided location, and size.

Parameters:

NameTypeDescription
destinationBitmapthe bitmap to draw the ellipse on
clrColorThe color of the ellipse
xDoubleThe distance from the left of the bitmap or bitmap to the left edge of the ellipse
yDoubleThe distance from the top of the bitmap or bitmap to the top edge of the ellipse
widthDoubleThe width of the ellipse
heightDoubleThe height of the ellipse

Signatures:

void fill_ellipse_on_bitmap(bitmap destination, color clr, double x, double y, double width, double height)

Fill Ellipse On Bitmap

Fills an ellipse on the given bitmap, using the provided location, size, and drawing options.

Parameters:

NameTypeDescription
destinationBitmapthe bitmap to draw the ellipse on
clrColorThe color of the ellipse
xDoubleThe distance from the left of the bitmap or bitmap to the left edge of the ellipse
yDoubleThe distance from the top of the bitmap or bitmap to the top edge of the ellipse
widthDoubleThe width of the ellipse
heightDoubleThe height of the ellipse
optsDrawing OptionsThe drawing options

Signatures:

void fill_ellipse_on_bitmap(bitmap destination, color clr, double x, double y, double width, double height, drawing_options opts)

Fill Ellipse On Window

Fill Ellipse On Window

Fill an ellipse on the given window, using the provided location, and size.

Parameters:

NameTypeDescription
destinationWindowthe window to draw the ellipse on
clrColorThe color of the ellipse
rectRectangleIndicates the location and size of the ellipse

Signatures:

void fill_ellipse_on_window(window destination, color clr, const rectangle rect)

Fill Ellipse On Window

Fills an ellipse on the given window, using the provided location, size, and drawing options. At this stage ellipse drawing is not affected by line width from the drawing options.

Parameters:

NameTypeDescription
destinationWindowthe window to draw the ellipse on
clrColorThe color of the ellipse
rectRectangleIndicates the location and size of the ellipse
optsDrawing OptionsThe drawing options

Signatures:

void fill_ellipse_on_window(window destination, color clr, const rectangle rect, drawing_options opts)

Fill Ellipse On Window

Fills an ellipse on the given window, using the provided location, and size.

Parameters:

NameTypeDescription
destinationWindowthe window to draw the ellipse on
clrColorThe color of the ellipse
xDoubleThe distance from the left of the bitmap or window to the left edge of the ellipse
yDoubleThe distance from the top of the bitmap or window to the top edge of the ellipse
widthDoubleThe width of the ellipse
heightDoubleThe height of the ellipse

Signatures:

void fill_ellipse_on_window(window destination, color clr, double x, double y, double width, double height)

Fill Ellipse On Window

Fills an ellipse on the given window, using the provided location, size, and drawing options.

Parameters:

NameTypeDescription
destinationWindowthe window to draw the ellipse on
clrColorThe color of the ellipse
xDoubleThe distance from the left of the bitmap or window to the left edge of the ellipse
yDoubleThe distance from the top of the bitmap or window to the top edge of the ellipse
widthDoubleThe width of the ellipse
heightDoubleThe height of the ellipse
optsDrawing OptionsThe drawing options

Signatures:

void fill_ellipse_on_window(window destination, color clr, double x, double y, double width, double height, drawing_options opts)

Clear Screen

Clear Screen

Clears the current screen to color white.

Signatures:

void clear_screen()

Clear Screen

Parameters:

NameTypeDescription
clrColorThe color to clear the screen’s background color to.

Signatures:

void clear_screen(color clr)

Display Details

Returns the details about one of the displays attached to the computer.

Parameters:

NameTypeDescription
indexunsigned intThe display number (from 0 to Number Of Displays - 1)

Return Type: Display

Signatures:

display display_details(unsigned int index)

Display Height

Return the height of the display in pixels, read from the system details.

Parameters:

NameTypeDescription
dispDisplayThe display details

Return Type: Integer

Signatures:

int display_height(display disp)

Display Name

Return the name of the display, read from the system details.

Parameters:

NameTypeDescription
dispDisplayThe display details

Return Type: String

Signatures:

string display_name(display disp)

Display Width

Return the width of the display in pixels, read from the system details.

Parameters:

NameTypeDescription
dispDisplayThe display details

Return Type: Integer

Signatures:

int display_width(display disp)

Display X

Return a relative x location for the display in pixels, read from the system details. This can be used to work out the arrangement of displays.

Parameters:

NameTypeDescription
dispDisplayThe display details

Return Type: Integer

Signatures:

int display_x(display disp)

Display Y

Return a relative y location for the display in pixels, read from the system details. This can be used to work out the arrangement of displays.

Parameters:

NameTypeDescription
dispDisplayThe display details

Return Type: Integer

Signatures:

int display_y(display disp)

Number Of Displays

Returns the number of physical displays attached to the computer.

Return Type: Integer

Signatures:

int number_of_displays()

Refresh Screen

Refresh Screen

Signatures:

void refresh_screen()

Refresh Screen

Refreshes all open windows with a target FPS (frames per second). This will delay a period of time that will approximately meet the targeted frames per second.

Parameters:

NameTypeDescription
target_fpsunsigned intThe targeted frames per second to refresh the screen at.

Signatures:

void refresh_screen(unsigned int target_fps)

Save Bitmap

Save the bitmap to the user’s desktop.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to save
basenameStringThe base of the filename. If there is a file of this name already, then the name will be changed to generate a unique filename.

Signatures:

void save_bitmap(bitmap bmp, const string &basename)

Screen Height

Returns the height of the current window.

Return Type: Integer

Signatures:

int screen_height()

Screen Width

Returns the width of the current window.

Return Type: Integer

Signatures:

int screen_width()

Take Screenshot

Take Screenshot

Saves a screenshot of the current window to a bitmap file. The file will be saved onto the user’s desktop.

Parameters:

NameTypeDescription
basenameStringThe base of the filename. If there is a file of this name already, then the name will be changed to generate a unique filename.

Signatures:

void take_screenshot(const string &basename)

Take Screenshot

Saves a screenshot of the current window to a bitmap file. The file will be saved onto the user’s desktop.

Parameters:

NameTypeDescription
windWindowThe window to capture in the screenshot
basenameStringThe base of the filename. If there is a file of this name already, then the name will be changed to generate a unique filename.

Signatures:

void take_screenshot(window wind, const string &basename)

Bitmap Bounding Circle

Returns a circle that will encompass the entire bitamp.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to encompass.
ptPoint 2dThe point where the bitmap is located.

Return Type: Circle

Signatures:

circle bitmap_bounding_circle(bitmap bmp, const point_2d &pt)

Bitmap Bounding Rectangle

Bitmap Bounding Rectangle

Returns a rectangle that is the same size as a bitmap (the whole bitmap).

Parameters:

NameTypeDescription
bmpBitmapThe bitmap

Return Type: Rectangle

Signatures:

rectangle bitmap_bounding_rectangle(bitmap bmp)

Bitmap Bounding Rectangle

Returns a rectangle that is the same size as the bitmap and is located at the indicated position.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap
xDoubleThe x location of the rectangle
yDoubleThe y location of the rectangle

Return Type: Rectangle

Signatures:

rectangle bitmap_bounding_rectangle(bitmap bmp, double x, double y)

Bitmap Cell Center

This returns a point that represents the center of a cell from this bitmap in local space.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to get the center of.

Return Type: Point 2d

Signatures:

point_2d bitmap_cell_center(bitmap bmp)

Bitmap Cell Circle

Bitmap Cell Circle

Returns a circle that will encompass the bitmap cell if it were drawn at the indicated point.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to get the details from.
xDoubleThe the x location of the bitmap.
yDoubleThe the y location of the bitmap.

Return Type: Circle

Signatures:

circle bitmap_cell_circle(bitmap bmp, double x, double y)

Bitmap Cell Circle

Returns a circle that will encompass the bitmap cell if it were drawn at the indicated point.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to get the details from.
ptPoint 2dThe point indicating the location of the bitmap.

Return Type: Circle

Signatures:

circle bitmap_cell_circle(bitmap bmp, const point_2d pt)

Bitmap Cell Circle

Returns a circle that will encompass the bitmap cell if it were drawn at the indicated point, with the provided scale.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to get the details from.
ptPoint 2dThe point indicating the location of the bitmap.
scaleDoubleThe scaling factor for the bitmap drawing.

Return Type: Circle

Signatures:

circle bitmap_cell_circle(bitmap bmp, const point_2d pt, double scale)

Bitmap Cell Columns

Returns the number of cell columns in the bitmap. This is setup using Bitmap Set Cell Details

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to check

Return Type: Integer

Signatures:

int bitmap_cell_columns(bitmap bmp)

Bitmap Cell Count

Returns the number of cells within the bitmap.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to check.

Return Type: Integer

Signatures:

int bitmap_cell_count(bitmap bmp)

Bitmap Cell Height

Returns the height of each cell in this bitmap.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to get the details from.

Return Type: Integer

Signatures:

int bitmap_cell_height(bitmap bmp)

Bitmap Cell Offset

Returns a vector that represents the movement needed to get to a given cell within a bitmap.

Parameters:

NameTypeDescription
srcBitmapThe bitmap with the cell details.
cellIntegerThe index of the cell

Return Type: Vector 2d

Signatures:

vector_2d bitmap_cell_offset(bitmap src, int cell)

Bitmap Cell Rectangle

Bitmap Cell Rectangle

Returns a rectangle that will encompass a cell of the bitmap.

Parameters:

NameTypeDescription
srcBitmapThe bitmap to get the details from

Return Type: Rectangle

Signatures:

rectangle bitmap_cell_rectangle(bitmap src)

Bitmap Cell Rectangle

Returns a rectangle that will encompass the bitmap cell if it were drawn at the indicated point.

Parameters:

NameTypeDescription
srcBitmapThe bitmap to get the details from
ptPoint 2dThe point details for the rectangle.

Return Type: Rectangle

Signatures:

rectangle bitmap_cell_rectangle(bitmap src, const point_2d &pt)

Bitmap Cell Rows

Returns the number of rows of cells in the bitmap. These details are set in Bitmap Set Cell Details.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to get the details from.

Return Type: Integer

Signatures:

int bitmap_cell_rows(bitmap bmp)

Bitmap Cell Width

Returns the width of each cell in this bitmap.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to get the details from.

Return Type: Integer

Signatures:

int bitmap_cell_width(bitmap bmp)

Bitmap Center

This returns a point that represents the center of the bitmap in local space.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to get the center of.

Return Type: Point 2d

Signatures:

point_2d bitmap_center(bitmap bmp)

Bitmap Filename

Returns the filename from which the bitmap was loaded. This will be an empty string for created bitmaps.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to get the filename from.

Return Type: String

Signatures:

string bitmap_filename(bitmap bmp)

Bitmap Height

Bitmap Height

Returns the total height of the bitmap. If the bitmap contains cells, you ca get the height of a cell using Bitmap Cell Height.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to get the details from.

Return Type: Integer

Signatures:

int bitmap_height(bitmap bmp)

Bitmap Height

Returns the total height of the bitmap. If the bitmap contains cells, you ca get the height of a cell using Bitmap Cell Height.

Parameters:

NameTypeDescription
nameStringThe name of the bitmap to get the details from.

Return Type: Integer

Signatures:

int bitmap_height(string name)

Bitmap Name

Returns the name of the bitmap was loaded. This is the name you can use to access this bitmap.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to get the name from.

Return Type: String

Signatures:

string bitmap_name(bitmap bmp)

Bitmap Named

Returns the Bitmap that has been loaded with the specified name, see Load Bitmap. This will attempt to load the bitmap if it has not been loaded.

Parameters:

NameTypeDescription
nameStringThe name of the bitmap to check.

Return Type: Bitmap

Signatures:

bitmap bitmap_named(string name)

Bitmap Rectangle Of Cell

Returns a rectangle that can be used to access the part of a bitmap related to an individual cell.

Parameters:

NameTypeDescription
srcBitmapThe bitmap
cellIntegerThe cell

Return Type: Rectangle

Signatures:

rectangle bitmap_rectangle_of_cell(bitmap src, int cell)

Bitmap Set Cell Details

Initialise the bitmap cell details. This allows parts of the bitmap to be drawn as individual cells.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap
widthIntegerThe width of each cell
heightIntegerThe height of each cell
columnsIntegerThe number of cell columns within the bitmap
rowsIntegerThe number of cell rows within the bitmap
countIntegerThe total number of cells, may be fewer than columns * rows

Signatures:

void bitmap_set_cell_details(bitmap bmp, int width, int height, int columns, int rows, int count)

Bitmap Valid

Lets you test if bitmap value is valid. This will return true when it is a valid bitmap.

Parameters:

NameTypeDescription
bmpBitmapthe bitmap to test

Return Type: Boolean

Signatures:

bool bitmap_valid(bitmap bmp)

Bitmap Width

Bitmap Width

Returns the width of the bitmap.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap

Return Type: Integer

Signatures:

int bitmap_width(bitmap bmp)

Bitmap Width

Returns the width of the bitmap.

Parameters:

NameTypeDescription
nameStringThe name of the bitmap

Return Type: Integer

Signatures:

int bitmap_width(string name)

Clear Bitmap

Clear Bitmap

Clear the bitmap to the indicated color. This will ensure the entire surface of the bitmap is set to that color.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap
clrColorThe new color for the surface of the bitmap

Signatures:

void clear_bitmap(bitmap bmp, color clr)

Clear Bitmap

Clear the bitmap to the indicated color. This will ensure the entire surface of the bitmap is set to that color.

Parameters:

NameTypeDescription
nameStringThe name of the bitmap
clrColorThe new color for the surface of the bitmap

Signatures:

void clear_bitmap(string name, color clr)

Create Bitmap

Creates a new bitmap that you can draw to. Initially the bitmap will be transparent.

Parameters:

NameTypeDescription
nameStringThe name of the bitmap resource to be created. If this already exists SplashKit will alter the name to make it unique.
widthIntegerThe width of the created bitmap
heightIntegerThe height of the created bitmap

Return Type: Bitmap

Signatures:

bitmap create_bitmap(string name, int width, int height)

Draw Bitmap

Draw Bitmap

Draws the bitmap supplied into bmp to the current window. at x and y.

Parameters:

NameTypeDescription
bmpBitmapthe bitmap which will be drawn to the screen
xDoublethe x location which represents where the bitmap will be drawn
yDoublethe y location which represents where the bitmap will be drawn

Signatures:

void draw_bitmap(bitmap bmp, double x, double y)

Draw Bitmap

Draws the bitmap supplied into bmp to the current window. with extra drawing options supplied in opts at x and y.

Parameters:

NameTypeDescription
bmpBitmapthe bitmap which will be drawn to the screen
xDoublethe x location which represents where the bitmap will be drawn
yDoublethe y location which represents where the bitmap will be drawn
optsDrawing Optionsthe Drawing Options which provide extra information for how to draw the Bitmap

Signatures:

void draw_bitmap(bitmap bmp, double x, double y, drawing_options opts)

Draw Bitmap

Searches and draws a bitmap with name name to the current window. with extra drawing options supplied in opts at x and y.

Parameters:

NameTypeDescription
nameStringthe name of the bitmap which will be drawn to the screen
xDoublethe x location which represents where the bitmap will be drawn
yDoublethe y location which represents where the bitmap will be drawn

Signatures:

void draw_bitmap(string name, double x, double y)

Draw Bitmap

Searches and draws a bitmap with name name to the current window. with extra drawing options supplied in opts at x and y.

Parameters:

NameTypeDescription
nameStringthe name of the bitmap which will be drawn to the screen
xDoublethe x location which represents where the bitmap will be drawn
yDoublethe y location which represents where the bitmap will be drawn
optsDrawing Optionsthe Drawing Options which provide extra information for how to draw the Bitmap

Signatures:

void draw_bitmap(string name, double x, double y, drawing_options opts)

Draw Bitmap On Bitmap

Draw Bitmap On Bitmap

Draws the bitmap supplied into bmp to the given bitmap. at x and y.

Parameters:

NameTypeDescription
destinationBitmapthe bitmap to draw the bitmap to
bmpBitmapthe bitmap which will be drawn to the screen
xDoublethe x location which represents where the bitmap will be drawn
yDoublethe y location which represents where the bitmap will be drawn

Signatures:

void draw_bitmap_on_bitmap(bitmap destination, bitmap bmp, double x, double y)

Draw Bitmap On Bitmap

Draws the bitmap supplied into bmp to the given bitmap. with extra drawing options supplied in opts at x and y.

Parameters:

NameTypeDescription
destinationBitmapthe bitmap to draw the bitmap to
bmpBitmapthe bitmap which will be drawn to the screen
xDoublethe x location which represents where the bitmap will be drawn
yDoublethe y location which represents where the bitmap will be drawn
optsDrawing Optionsthe Drawing Options which provide extra information for how to draw the Bitmap

Signatures:

void draw_bitmap_on_bitmap(bitmap destination, bitmap bmp, double x, double y, drawing_options opts)

Draw Bitmap On Window

Draw Bitmap On Window

Draws the bitmap supplied into bmp to the given window. at x and y.

Parameters:

NameTypeDescription
destinationWindowthe window to draw the bitmap to
bmpBitmapthe bitmap which will be drawn to the screen
xDoublethe x location which represents where the bitmap will be drawn
yDoublethe y location which represents where the bitmap will be drawn

Signatures:

void draw_bitmap_on_window(window destination, bitmap bmp, double x, double y)

Draw Bitmap On Window

Draws the bitmap supplied into bmp to the given window. with extra drawing options supplied in opts at x and y.

Parameters:

NameTypeDescription
destinationWindowthe window to draw the bitmap to
bmpBitmapthe bitmap which will be drawn to the screen
xDoublethe x location which represents where the bitmap will be drawn
yDoublethe y location which represents where the bitmap will be drawn
optsDrawing Optionsthe Drawing Options which provide extra information for how to draw the Bitmap

Signatures:

void draw_bitmap_on_window(window destination, bitmap bmp, double x, double y, drawing_options opts)

Free All Bitmaps

Free all of the loaded bitmap resources.

Signatures:

void free_all_bitmaps()

Free Bitmap

Frees the bitmap resource.

Parameters:

NameTypeDescription
to_deleteBitmapThe bitmap to be freed.

Signatures:

void free_bitmap(bitmap to_delete)

Has Bitmap

Determines if SplashKit has a bitmap loaded for the supplied name. This checks against all bitmaps loaded.

Parameters:

NameTypeDescription
nameStringThe name to check

Return Type: Boolean

Signatures:

bool has_bitmap(string name)

Load Bitmap

Loads and returns a bitmap. The supplied filename is used to locate the Bitmap to load. The supplied name indicates the name to use to refer to this Bitmap in SplashKit. The Bitmap can then be retrieved by passing this name to the Bitmap Named function.

Parameters:

NameTypeDescription
nameStringThe name of the bitmap resource in SplashKit
filenameStringThe filename to load

Return Type: Bitmap

Signatures:

bitmap load_bitmap(string name, string filename)

Pixel Drawn At Point

Pixel Drawn At Point

Check if the bitmap has a pixel drawn at the indicated point.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to check.
ptPoint 2dThe point within the bitmap to check.

Return Type: Boolean

Signatures:

bool pixel_drawn_at_point(bitmap bmp, const point_2d &pt)

Pixel Drawn At Point

Check if the bitmap has a pixel drawn at the indicated point.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to check.
xDoubleThe x coordinate within the bitmap to check
yDoubleThe y coordinate within the bitmap to check

Return Type: Boolean

Signatures:

bool pixel_drawn_at_point(bitmap bmp, double x, double y)

Pixel Drawn At Point

Check if the bitmap has a pixel drawn at the indicated point in the cell.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to check.
cellIntegerThe bitmap cell to check.
ptPoint 2dThe point within the bitmap to check.

Return Type: Boolean

Signatures:

bool pixel_drawn_at_point(bitmap bmp, int cell, const point_2d &pt)

Pixel Drawn At Point

Check if the bitmap has a pixel drawn at the indicated point in the cell.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to check.
cellIntegerThe bitmap cell to check.
xDoubleThe x coordinate within the bitmap to check
yDoubleThe y coordinate within the bitmap to check

Return Type: Boolean

Signatures:

bool pixel_drawn_at_point(bitmap bmp, int cell, double x, double y)

Setup Collision Mask

Sets up the collision mask for a bitmap. This enables collision detection between this bitmap and other bitmaps or shapes. This is automatically called when a bitmap is loaded, and only needs to be called on bitmaps created using Create Bitmap, and when a bitmap is changed by drawing onto the bitmap.

Parameters:

NameTypeDescription
bmpBitmapthe bitmap to setup

Signatures:

void setup_collision_mask(bitmap bmp)

Draw Line

Draw Line

Draws a line onto the current window.

Parameters:

NameTypeDescription
clrColorThe color of the line
lLineThe line’s details

Signatures:

void draw_line(color clr, const line &l)

Draw Line

Draws a line.

Parameters:

NameTypeDescription
clrColorThe color of the line
lLineThe line’s details
optsDrawing OptionsThe drawing options

Signatures:

void draw_line(color clr, const line &l, drawing_options opts)

Draw Line

Draw a line from one point to another on the current window.

Parameters:

NameTypeDescription
clrColorThe color of the line
from_ptPoint 2dThe start of the line
to_ptPoint 2dThe end of the line

Signatures:

void draw_line(color clr, const point_2d &from_pt, const point_2d &to_pt)

Draw Line

Draw a line from one point to another on the current window.

Parameters:

NameTypeDescription
clrColorThe color of the line
from_ptPoint 2dThe start of the line
to_ptPoint 2dThe end of the line
optsDrawing OptionsThe drawing options

Signatures:

void draw_line(color clr, const point_2d &from_pt, const point_2d &to_pt, const drawing_options &opts)

Draw Line

Draw a line from one point to another on the current window.

Parameters:

NameTypeDescription
clrColorThe color of the line
x1DoubleThe distance from the left of the window/bitmap to the first point
y1DoubleThe distance from the top of the window/bitmap to the first point
x2DoubleThe distance from the left of the window/bitmap to the second point
y2DoubleThe distance from the top of the window/bitmap to the second point

Signatures:

void draw_line(color clr, double x1, double y1, double x2, double y2)

Draw Line

Draw a line from one point to another

Parameters:

NameTypeDescription
clrColorThe color of the line
x1DoubleThe distance from the left of the window/bitmap to the first point
y1DoubleThe distance from the top of the window/bitmap to the first point
x2DoubleThe distance from the left of the window/bitmap to the second point
y2DoubleThe distance from the top of the window/bitmap to the second point
optsDrawing OptionsThe drawing options

Signatures:

void draw_line(color clr, double x1, double y1, double x2, double y2, const drawing_options &opts)

Draw Line On Bitmap

Draw Line On Bitmap

Draws a line onto the given bitmap.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the line
lLineThe line’s details

Signatures:

void draw_line_on_bitmap(bitmap destination, color clr, const line &l)

Draw Line On Bitmap

Draws a line on the given bitmap.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the line
lLineThe line’s details
optsDrawing OptionsThe drawing options

Signatures:

void draw_line_on_bitmap(bitmap destination, color clr, const line &l, drawing_options opts)

Draw Line On Bitmap

Draw a line from one point to another on the given bitmap.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the line
from_ptPoint 2dThe start of the line
to_ptPoint 2dThe end of the line

Signatures:

void draw_line_on_bitmap(bitmap destination, color clr, const point_2d &from_pt, const point_2d &to_pt)

Draw Line On Bitmap

Draw a line from one point to another on the given bitmap.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the line
from_ptPoint 2dThe start of the line
to_ptPoint 2dThe end of the line
optsDrawing OptionsThe drawing options

Signatures:

void draw_line_on_bitmap(bitmap destination, color clr, const point_2d &from_pt, const point_2d &to_pt, const drawing_options &opts)

Draw Line On Bitmap

Draw a line from one point to another on the given bitmap.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the line
x1DoubleThe distance from the left of the bitmap/bitmap to the first point
y1DoubleThe distance from the top of the bitmap/bitmap to the first point
x2DoubleThe distance from the left of the bitmap/bitmap to the second point
y2DoubleThe distance from the top of the bitmap/bitmap to the second point

Signatures:

void draw_line_on_bitmap(bitmap destination, color clr, double x1, double y1, double x2, double y2)

Draw Line On Bitmap

Draw a line from one point to another

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the line
x1DoubleThe distance from the left of the bitmap/bitmap to the first point
y1DoubleThe distance from the top of the bitmap/bitmap to the first point
x2DoubleThe distance from the left of the bitmap/bitmap to the second point
y2DoubleThe distance from the top of the bitmap/bitmap to the second point
optsDrawing OptionsThe drawing options

Signatures:

void draw_line_on_bitmap(bitmap destination, color clr, double x1, double y1, double x2, double y2, const drawing_options &opts)

Draw Line On Window

Draw Line On Window

Draws a line onto the given window.

Parameters:

NameTypeDescription
destinationWindowThe destination bitmap
clrColorThe color of the line
lLineThe line’s details

Signatures:

void draw_line_on_window(window destination, color clr, const line &l)

Draw Line On Window

Draws a line on the given window.

Parameters:

NameTypeDescription
destinationWindowThe destination bitmap
clrColorThe color of the line
lLineThe line’s details
optsDrawing OptionsThe drawing options

Signatures:

void draw_line_on_window(window destination, color clr, const line &l, drawing_options opts)

Draw Line On Window

Draw a line from one point to another on the given window.

Parameters:

NameTypeDescription
destinationWindowThe destination bitmap
clrColorThe color of the line
from_ptPoint 2dThe start of the line
to_ptPoint 2dThe end of the line

Signatures:

void draw_line_on_window(window destination, color clr, const point_2d &from_pt, const point_2d &to_pt)

Draw Line On Window

Draw a line from one point to another on the given window.

Parameters:

NameTypeDescription
destinationWindowThe destination bitmap
clrColorThe color of the line
from_ptPoint 2dThe start of the line
to_ptPoint 2dThe end of the line
optsDrawing OptionsThe drawing options

Signatures:

void draw_line_on_window(window destination, color clr, const point_2d &from_pt, const point_2d &to_pt, const drawing_options &opts)

Draw Line On Window

Draw a line from one point to another on the given window.

Parameters:

NameTypeDescription
destinationWindowThe destination bitmap
clrColorThe color of the line
x1DoubleThe distance from the left of the window/bitmap to the first point
y1DoubleThe distance from the top of the window/bitmap to the first point
x2DoubleThe distance from the left of the window/bitmap to the second point
y2DoubleThe distance from the top of the window/bitmap to the second point

Signatures:

void draw_line_on_window(window destination, color clr, double x1, double y1, double x2, double y2)

Draw Line On Window

Draw a line from one point to another

Parameters:

NameTypeDescription
destinationWindowThe destination bitmap
clrColorThe color of the line
x1DoubleThe distance from the left of the window/bitmap to the first point
y1DoubleThe distance from the top of the window/bitmap to the first point
x2DoubleThe distance from the left of the window/bitmap to the second point
y2DoubleThe distance from the top of the window/bitmap to the second point
optsDrawing OptionsThe drawing options

Signatures:

void draw_line_on_window(window destination, color clr, double x1, double y1, double x2, double y2, const drawing_options &opts)

Draw Pixel

Draw Pixel

Draws an individual pixel to the current window.

Parameters:

NameTypeDescription
clrColorThe color of the pixel
ptPoint 2dThe location of the pixel to draw

Signatures:

void draw_pixel(color clr, const point_2d &pt)

Draw Pixel

Draws an individual pixel with the supplied options.

Parameters:

NameTypeDescription
clrColorThe color of the pixel
ptPoint 2dThe location of the pixel to draw
optsDrawing OptionsThe drawing options

Signatures:

void draw_pixel(color clr, const point_2d &pt, drawing_options opts)

Draw Pixel

Draws an individual pixel to the current window.

Parameters:

NameTypeDescription
clrColorThe color of the pixel
xDoubleThe distance from the left edge of the window to the pixel
yDoubleThe distance from the top edge of the window to the pixel

Signatures:

void draw_pixel(color clr, double x, double y)

Draw Pixel

Draws an individual pixel with the supplied options.

Parameters:

NameTypeDescription
clrColorThe color of the pixel
xDoubleThe distance from the left edge of the window/bitmap to the pixel
yDoubleThe distance from the top edge of the window/bitmap to the pixel
optsDrawing OptionsThe drawing options

Signatures:

void draw_pixel(color clr, double x, double y, drawing_options opts)

Draw Pixel On Bitmap

Draw Pixel On Bitmap

Draws an individual pixel to the given bitmap.

Parameters:

NameTypeDescription
destinationBitmapthe bitmap to draw the pixel on
clrColorThe color of the pixel
ptPoint 2dThe location of the pixel to draw

Signatures:

void draw_pixel_on_bitmap(bitmap destination, color clr, const point_2d &pt)

Draw Pixel On Bitmap

Draws an individual pixel to the given bitmap with the given drawing options.

Parameters:

NameTypeDescription
destinationBitmapthe bitmap to draw the pixel on
clrColorThe color of the pixel
ptPoint 2dThe location of the pixel to draw
optsDrawing OptionsThe drawing options

Signatures:

void draw_pixel_on_bitmap(bitmap destination, color clr, const point_2d &pt, drawing_options opts)

Draw Pixel On Bitmap

Draws an individual pixel to the given bitmap.

Parameters:

NameTypeDescription
destinationBitmapthe bitmap to draw the pixel on
clrColorThe color of the pixel
xDoubleThe distance from the left edge of the bitmap to the pixel
yDoubleThe distance from the top edge of the bitmap to the pixel

Signatures:

void draw_pixel_on_bitmap(bitmap destination, color clr, double x, double y)

Draw Pixel On Bitmap

Draws an individual pixel to the given bitmap with the given drawing options.

Parameters:

NameTypeDescription
destinationBitmapthe bitmap to draw the pixel on
clrColorThe color of the pixel
xDoubleThe distance from the left edge of the bitmap to the pixel
yDoubleThe distance from the top edge of the bitmap to the pixel
optsDrawing OptionsThe drawing options

Signatures:

void draw_pixel_on_bitmap(bitmap destination, color clr, double x, double y, drawing_options opts)

Draw Pixel On Window

Draw Pixel On Window

Draws an individual pixel to the given window.

Parameters:

NameTypeDescription
destinationWindowThe window to draw the pixel on
clrColorThe color of the pixel
ptPoint 2dThe location of the pixel to draw

Signatures:

void draw_pixel_on_window(window destination, color clr, const point_2d &pt)

Draw Pixel On Window

Draws an individual pixel to the given window with the given drawing options.

Parameters:

NameTypeDescription
destinationWindowThe window to draw the pixel on
clrColorThe color of the pixel
ptPoint 2dThe location of the pixel to draw
optsDrawing OptionsThe drawing options

Signatures:

void draw_pixel_on_window(window destination, color clr, const point_2d &pt, drawing_options opts)

Draw Pixel On Window

Draws an individual pixel to the given window.

Parameters:

NameTypeDescription
destinationWindowthe window to draw the pixel on
clrColorThe color of the pixel
xDoubleThe distance from the left edge of the window to the pixel
yDoubleThe distance from the top edge of the window to the pixel

Signatures:

void draw_pixel_on_window(window destination, color clr, double x, double y)

Draw Pixel On Window

Draws an individual pixel to the given window with the given drawing options.

Parameters:

NameTypeDescription
destinationWindowThe window to draw the pixel on
clrColorThe color of the pixel
xDoubleThe distance from the left edge of the window to the pixel
yDoubleThe distance from the top edge of the window to the pixel
optsDrawing OptionsThe drawing options

Signatures:

void draw_pixel_on_window(window destination, color clr, double x, double y, drawing_options opts)

Get Pixel

Get Pixel

Returns the color of the pixel at the location on the supplied bitmap.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to get the color from
ptPoint 2dThe position of the pixel

Return Type: Color

Signatures:

color get_pixel(bitmap bmp, const point_2d &pt)

Get Pixel

Returns the color of the pixel at the x,y location on the supplied bitmap.

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to get the color from
xDoubleThe distance from the left edge of the bitmap to the pixel to read
yDoubleThe distance from the top of the bitmap to the pixel to read

Return Type: Color

Signatures:

color get_pixel(bitmap bmp, double x, double y)

Get Pixel

Returns the color of the pixel at the x,y location on the current window.

Parameters:

NameTypeDescription
ptPoint 2dThe position of the pixel

Return Type: Color

Signatures:

color get_pixel(const point_2d &pt)

Get Pixel

Returns the color of the pixel at the x,y location on the current window.

Parameters:

NameTypeDescription
xDoubleThe distance from the left edge of the window to the pixel to read
yDoubleThe distance from the top of the window to the pixel to read

Return Type: Color

Signatures:

color get_pixel(double x, double y)

Get Pixel

Returns the color of the pixel at the location on the supplied window.

Parameters:

NameTypeDescription
wndWindowThe window to get the color from
ptPoint 2dThe position of the pixel

Return Type: Color

Signatures:

color get_pixel(window wnd, const point_2d &pt)

Get Pixel

Returns the color of the pixel at the x,y location on the supplied window.

Parameters:

NameTypeDescription
wndWindowThe window to get the color from
xDoubleThe distance from the left edge of the window to the pixel to read
yDoubleThe distance from the top of the window to the pixel to read

Return Type: Color

Signatures:

color get_pixel(window wnd, double x, double y)

Get Pixel From Window

Get Pixel From Window

Returns the color of the pixel at the x,y location on the given window.

Parameters:

NameTypeDescription
destinationWindowThe window to draw the pixel on
ptPoint 2dThe position of the pixel

Return Type: Color

Signatures:

color get_pixel_from_window(window destination, const point_2d &pt)

Get Pixel From Window

Returns the color of the pixel at the x,y location on the given window.

Parameters:

NameTypeDescription
destinationWindowThe window to draw the pixel on
xDoubleThe distance from the left edge of the window to the pixel to read
yDoubleThe distance from the top of the window to the pixel to read

Return Type: Color

Signatures:

color get_pixel_from_window(window destination, double x, double y)

Draw Quad

Draw Quad

Draw a quad to the current window.

Parameters:

NameTypeDescription
clrColorThe color for the quad
qQuadThe details of the quad

Signatures:

void draw_quad(color clr, const quad &q)

Draw Quad

Draw a quad using the supplied drawing options.

Parameters:

NameTypeDescription
clrColorThe color for the quad
qQuadThe details of the quad
optsDrawing OptionsThe drawing options

Signatures:

void draw_quad(color clr, const quad &q, const drawing_options &opts)

Draw Quad On Bitmap

Draw Quad On Bitmap

Draw a quad on the supplied bitmap to the current bitmap.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color for the quad
qQuadThe details of the quad

Signatures:

void draw_quad_on_bitmap(bitmap destination, color clr, const quad &q)

Draw Quad On Bitmap

Draw a quad on the supplied bitmap using the supplied drawing options.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color for the quad
qQuadThe details of the quad
optsDrawing OptionsThe drawing options

Signatures:

void draw_quad_on_bitmap(bitmap destination, color clr, const quad &q, const drawing_options &opts)

Draw Quad On Window

Draw Quad On Window

Draw a quad on the supplied window to the current window.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color for the quad
qQuadThe details of the quad

Signatures:

void draw_quad_on_window(window destination, color clr, const quad &q)

Draw Quad On Window

Draw a quad on the supplied window using the supplied drawing options.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color for the quad
qQuadThe details of the quad
optsDrawing OptionsThe drawing options

Signatures:

void draw_quad_on_window(window destination, color clr, const quad &q, const drawing_options &opts)

Draw Rectangle

Draw Rectangle

Draw a rectangle onto the current window.

Parameters:

NameTypeDescription
clrColorThe color of the rectangle
rectRectangleThe rectangle to draw

Signatures:

void draw_rectangle(color clr, const rectangle &rect)

Draw Rectangle

Draw a rectangle using the supplied drawing options.

Parameters:

NameTypeDescription
clrColorThe color of the rectangle
rectRectangleThe rectangle to draw
optsDrawing OptionsThe drawing options

Signatures:

void draw_rectangle(color clr, const rectangle &rect, const drawing_options &opts)

Draw Rectangle

Draw a rectangle to the current window.

Parameters:

NameTypeDescription
clrColorThe color of the rectangle
xDoubleThe distance from the left of the window/bitmap to the rectangle
yDoubleThe distance from the top of the window/bitmap to the rectangle
widthDoubleThe width of the rectangle
heightDoubleThe height of the rectangle

Signatures:

void draw_rectangle(color clr, double x, double y, double width, double height)

Draw Rectangle

Draw a rectangle using the supplied drawing options.

Parameters:

NameTypeDescription
clrColorThe color of the rectangle
xDoubleThe distance from the left of the window/bitmap to the rectangle
yDoubleThe distance from the top of the window/bitmap to the rectangle
widthDoubleThe width of the rectangle
heightDoubleThe height of the rectangle
optsDrawing OptionsThe drawing options

Signatures:

void draw_rectangle(color clr, double x, double y, double width, double height, const drawing_options &opts)

Draw Rectangle On Bitmap

Draw Rectangle On Bitmap

Draw a rectangle to the bitmap using the supplied rect. The rectangle is centred on its x, y coordinates, and has the provided width and height.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the rectangle
rectRectanglethe rectangle to be drawn to the bitmap

Signatures:

void draw_rectangle_on_bitmap(bitmap destination, color clr, const rectangle &rect)

Draw Rectangle On Bitmap

Draw a rectangle to the bitmap using the supplied rect and drawing options. The rectangle is centred on its x, y coordinates, and has the provided width and height.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the rectangle
rectRectanglethe rectangle to be drawn to the bitmap
optsDrawing OptionsDrawing options to configure the drawing operation

Signatures:

void draw_rectangle_on_bitmap(bitmap destination, color clr, const rectangle &rect, const drawing_options &opts)

Draw Rectangle On Bitmap

Draw a rectangle to the bitmap using. The rectangle is centred on its x, y coordinates, and has the provided width and height.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the rectangle
xDoubleThe x location of the rectangle
yDoubleThe y location of the rectangle
widthDoubleThe width of the rectangle
heightDoubleThe height of the rectangle

Signatures:

void draw_rectangle_on_bitmap(bitmap destination, color clr, double x, double y, double width, double height)

Draw Rectangle On Bitmap

Draw a rectangle to the bitmap using the supplied drawing options. The rectangle is centred on its x, y coordinates, and has the provided width and height.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the rectangle
xDoubleThe x location of the rectangle
yDoubleThe y location of the rectangle
widthDoubleThe width of the rectangle
heightDoubleThe height of the rectangle
optsDrawing OptionsDrawing options to configure the drawing operation

Signatures:

void draw_rectangle_on_bitmap(bitmap destination, color clr, double x, double y, double width, double height, drawing_options opts)

Draw Rectangle On Window

Draw Rectangle On Window

Draw a rectangle to the window using the supplied rect. The rectangle is centred on its x, y coordinates, and has the provided width and height.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color of the rectangle
rectRectanglethe rectangle to be drawn to the window

Signatures:

void draw_rectangle_on_window(window destination, color clr, const rectangle &rect)

Draw Rectangle On Window

Draw a rectangle to the window using the supplied rect and drawing options. The rectangle is centred on its x, y coordinates, and has the provided width and height.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color of the rectangle
rectRectanglethe rectangle to be drawn to the window
optsDrawing OptionsDrawing options to configure the drawing operation

Signatures:

void draw_rectangle_on_window(window destination, color clr, const rectangle &rect, const drawing_options &opts)

Draw Rectangle On Window

Draw a rectangle to the window using. The rectangle is centred on its x, y coordinates, and has the provided width and height.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color of the rectangle
xDoubleThe x location of the rectangle
yDoubleThe y location of the rectangle
widthDoubleThe width of the rectangle
heightDoubleThe height of the rectangle

Signatures:

void draw_rectangle_on_window(window destination, color clr, double x, double y, double width, double height)

Draw Rectangle On Window

Draw a rectangle to the window using the supplied drawing options. The rectangle is centred on its x, y coordinates, and has the provided width and height.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color of the rectangle
xDoubleThe x location of the rectangle
yDoubleThe y location of the rectangle
widthDoubleThe width of the rectangle
heightDoubleThe height of the rectangle
optsDrawing OptionsDrawing options to configure the drawing operation

Signatures:

void draw_rectangle_on_window(window destination, color clr, double x, double y, double width, double height, drawing_options opts)

Fill Quad

Fill Quad

Fill a quad on the current window.

Parameters:

NameTypeDescription
clrColorThe color for the quad
qQuadThe details of the quad

Signatures:

void fill_quad(color clr, const quad &q)

Fill Quad

Fill a quad using the supplied drawing options.

Parameters:

NameTypeDescription
clrColorThe color for the quad
qQuadThe details of the quad
optsDrawing OptionsThe drawing options

Signatures:

void fill_quad(color clr, const quad &q, const drawing_options &opts)

Fill Quad On Bitmap

Fill Quad On Bitmap

Fill a quad on the supplied bitmap on the current bitmap.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color for the quad
qQuadThe details of the quad

Signatures:

void fill_quad_on_bitmap(bitmap destination, color clr, const quad &q)

Fill Quad On Bitmap

Fill a quad on the supplied bitmap using the supplied drawing options.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color for the quad
qQuadThe details of the quad
optsDrawing OptionsThe drawing options

Signatures:

void fill_quad_on_bitmap(bitmap destination, color clr, const quad &q, const drawing_options &opts)

Fill Quad On Window

Fill Quad On Window

Fill a quad on the supplied window on the current window.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color for the quad
qQuadThe details of the quad

Signatures:

void fill_quad_on_window(window destination, color clr, const quad &q)

Fill Quad On Window

Fill a quad on the supplied window using the supplied drawing options.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color for the quad
qQuadThe details of the quad
optsDrawing OptionsThe drawing options

Signatures:

void fill_quad_on_window(window destination, color clr, const quad &q, const drawing_options &opts)

Fill Rectangle

Fill Rectangle

Fill a rectangle onto the current window.

Parameters:

NameTypeDescription
clrColorThe color of the rectangle
rectRectangleThe rectangle to draw

Signatures:

void fill_rectangle(color clr, const rectangle &rect)

Fill Rectangle

Fills a rectangle using the supplied drawing options.

Parameters:

NameTypeDescription
clrColorThe color of the rectangle
rectRectangleThe rectangle to draw
optsDrawing OptionsThe drawing options

Signatures:

void fill_rectangle(color clr, const rectangle &rect, const drawing_options &opts)

Fill Rectangle

Fills a rectangle to the current window.

Parameters:

NameTypeDescription
clrColorThe color of the rectangle
xDoubleThe distance from the left of the window/bitmap to the rectangle
yDoubleThe distance from the top of the window/bitmap to the rectangle
widthDoubleThe width of the rectangle
heightDoubleThe height of the rectangle

Signatures:

void fill_rectangle(color clr, double x, double y, double width, double height)

Fill Rectangle

Fills a rectangle using the supplied drawing options.

Parameters:

NameTypeDescription
clrColorThe color of the rectangle
xDoubleThe distance from the left of the window/bitmap to the rectangle
yDoubleThe distance from the top of the window/bitmap to the rectangle
widthDoubleThe width of the rectangle
heightDoubleThe height of the rectangle
optsDrawing OptionsThe drawing options

Signatures:

void fill_rectangle(color clr, double x, double y, double width, double height, const drawing_options &opts)

Fill Rectangle On Bitmap

Fill Rectangle On Bitmap

Fill a rectangle on the supplied bitmap onto the current bitmap.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the rectangle
rectRectangleThe rectangle to draw

Signatures:

void fill_rectangle_on_bitmap(bitmap destination, color clr, const rectangle &rect)

Fill Rectangle On Bitmap

Fills a rectangle on the supplied bitmap using the supplied drawing options.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the rectangle
rectRectangleThe rectangle to draw
optsDrawing OptionsThe drawing options

Signatures:

void fill_rectangle_on_bitmap(bitmap destination, color clr, const rectangle &rect, const drawing_options &opts)

Fill Rectangle On Bitmap

Fills a rectangle on the supplied bitmap to the current bitmap.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the rectangle
xDoubleThe distance from the left of the bitmap/bitmap to the rectangle
yDoubleThe distance from the top of the bitmap/bitmap to the rectangle
widthDoubleThe width of the rectangle
heightDoubleThe height of the rectangle

Signatures:

void fill_rectangle_on_bitmap(bitmap destination, color clr, double x, double y, double width, double height)

Fill Rectangle On Bitmap

Fills a rectangle on the supplied bitmap, using the supplied drawing options.

Parameters:

NameTypeDescription
destinationBitmapThe destination bitmap
clrColorThe color of the rectangle
xDoubleThe distance from the left of the bitmap/bitmap to the rectangle
yDoubleThe distance from the top of the bitmap/bitmap to the rectangle
widthDoubleThe width of the rectangle
heightDoubleThe height of the rectangle
optsDrawing OptionsThe drawing options

Signatures:

void fill_rectangle_on_bitmap(bitmap destination, color clr, double x, double y, double width, double height, const drawing_options &opts)

Fill Rectangle On Window

Fill Rectangle On Window

Fill a rectangle on the supplied window onto the current window.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color of the rectangle
rectRectangleThe rectangle to draw

Signatures:

void fill_rectangle_on_window(window destination, color clr, const rectangle &rect)

Fill Rectangle On Window

Fills a rectangle on the supplied window using the supplied drawing options.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color of the rectangle
rectRectangleThe rectangle to draw
optsDrawing OptionsThe drawing options

Signatures:

void fill_rectangle_on_window(window destination, color clr, const rectangle &rect, const drawing_options &opts)

Fill Rectangle On Window

Fills a rectangle on the supplied window to the current window.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color of the rectangle
xDoubleThe distance from the left of the window/bitmap to the rectangle
yDoubleThe distance from the top of the window/bitmap to the rectangle
widthDoubleThe width of the rectangle
heightDoubleThe height of the rectangle

Signatures:

void fill_rectangle_on_window(window destination, color clr, double x, double y, double width, double height)

Fill Rectangle On Window

Fills a rectangle on the supplied window, using the supplied drawing options.

Parameters:

NameTypeDescription
destinationWindowThe destination window
clrColorThe color of the rectangle
xDoubleThe distance from the left of the window/bitmap to the rectangle
yDoubleThe distance from the top of the window/bitmap to the rectangle
widthDoubleThe width of the rectangle
heightDoubleThe height of the rectangle
optsDrawing OptionsThe drawing options

Signatures:

void fill_rectangle_on_window(window destination, color clr, double x, double y, double width, double height, const drawing_options &opts)

Draw Text

Draw Text

Parameters:

NameTypeDescription
textStringThe text string to be written to the window.
clrColorThe desired Color of the text to be written.
fntStringThe name of the Font which will be used to draw the text
font_sizeIntegerThe size of the font which will be drawn.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.

Signatures:

void draw_text(const string &text, const color &clr, const string &fnt, int font_size, double x, double y)

Draw Text

Parameters:

NameTypeDescription
textStringThe text string to be written to the window.
clrColorThe desired Color of the text to be written.
fntStringThe name of the Font which will be used to draw the text
font_sizeIntegerThe size of the font which will be drawn.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.
optsDrawing OptionsThe Drawing Options which provide extra information for how to draw the text.

Signatures:

void draw_text(const string &text, const color &clr, const string &fnt, int font_size, double x, double y, const drawing_options &opts)

Draw Text

Parameters:

NameTypeDescription
textStringThe text string to be written to the window.
clrColorThe desired Color of the text to be written.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.

Signatures:

void draw_text(const string &text, const color &clr, double x, double y)

Draw Text

Parameters:

NameTypeDescription
textStringThe text string to be written to the window.
clrColorThe desired Color of the text to be written.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.
optsDrawing OptionsThe Drawing Options which provide extra information for how to draw the text.

Signatures:

void draw_text(const string &text, const color &clr, double x, double y, const drawing_options &opts)

Draw Text

Parameters:

NameTypeDescription
textStringThe text string to be written to the window.
clrColorThe desired Color of the text to be written.
fntFontThe Font to be used to draw the text.
font_sizeIntegerThe size of the font which will be drawn.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.

Signatures:

void draw_text(const string &text, const color &clr, font fnt, int font_size, double x, double y)

Draw Text

Parameters:

NameTypeDescription
textStringThe text string to be written to the window.
clrColorThe desired Color of the text to be written.
fntFontThe Font to be used to draw the text.
font_sizeIntegerThe desired size of the font.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.
optsDrawing OptionsThe Drawing Options which provide extra information for how to draw the text.

Signatures:

void draw_text(const string &text, const color &clr, font fnt, int font_size, double x, double y, const drawing_options &opts)

Draw Text On Bitmap

Draw Text On Bitmap

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to draw to
textStringThe text string to be written to the bitmap.
clrColorThe desired Color of the text to be written.
fntStringThe name of the Font which will be used to draw the text
font_sizeIntegerThe size of the font which will be drawn.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.

Signatures:

void draw_text_on_bitmap(bitmap bmp, const string &text, const color &clr, const string &fnt, int font_size, double x, double y)

Draw Text On Bitmap

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to draw to
textStringThe text string to be written to the bitmap.
clrColorThe desired Color of the text to be written.
fntStringThe name of the Font which will be used to draw the text
font_sizeIntegerThe size of the font which will be drawn.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.
optsDrawing OptionsThe Drawing Options which provide extra information for how to draw the text.

Signatures:

void draw_text_on_bitmap(bitmap bmp, const string &text, const color &clr, const string &fnt, int font_size, double x, double y, const drawing_options &opts)

Draw Text On Bitmap

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to draw to
textStringThe text string to be written to the bitmap.
clrColorThe desired Color of the text to be written.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.

Signatures:

void draw_text_on_bitmap(bitmap bmp, const string &text, const color &clr, double x, double y)

Draw Text On Bitmap

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to draw to
textStringThe text string to be written to the bitmap.
clrColorThe desired Color of the text to be written.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.
optsDrawing OptionsThe Drawing Options which provide extra information for how to draw the text.

Signatures:

void draw_text_on_bitmap(bitmap bmp, const string &text, const color &clr, double x, double y, const drawing_options &opts)

Draw Text On Bitmap

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to draw to
textStringThe text string to be written to the bitmap.
clrColorThe desired Color of the text to be written.
fntFontThe Font to be used to draw the text.
font_sizeIntegerThe size of the font which will be drawn.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.

Signatures:

void draw_text_on_bitmap(bitmap bmp, const string &text, const color &clr, font fnt, int font_size, double x, double y)

Draw Text On Bitmap

Parameters:

NameTypeDescription
bmpBitmapThe bitmap to draw to
textStringThe text string to be written to the bitmap.
clrColorThe desired Color of the text to be written.
fntFontThe Font to be used to draw the text.
font_sizeIntegerThe desired size of the font.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.
optsDrawing OptionsThe Drawing Options which provide extra information for how to draw the text.

Signatures:

void draw_text_on_bitmap(bitmap bmp, const string &text, const color &clr, font fnt, int font_size, double x, double y, const drawing_options &opts)

Draw Text On Window

Draw Text On Window

Parameters:

NameTypeDescription
wndWindowThe window to draw to
textStringThe text string to be written to the window.
clrColorThe desired Color of the text to be written.
fntStringThe name of the Font which will be used to draw the text
font_sizeIntegerThe size of the font which will be drawn.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.

Signatures:

void draw_text_on_window(window wnd, const string &text, const color &clr, const string &fnt, int font_size, double x, double y)

Draw Text On Window

Parameters:

NameTypeDescription
wndWindowThe window to draw to
textStringThe text string to be written to the window.
clrColorThe desired Color of the text to be written.
fntStringThe name of the Font which will be used to draw the text
font_sizeIntegerThe size of the font which will be drawn.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.
optsDrawing OptionsThe Drawing Options which provide extra information for how to draw the text.

Signatures:

void draw_text_on_window(window wnd, const string &text, const color &clr, const string &fnt, int font_size, double x, double y, const drawing_options &opts)

Draw Text On Window

Parameters:

NameTypeDescription
wndWindowThe window to draw to
textStringThe text string to be written to the window.
clrColorThe desired Color of the text to be written.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.

Signatures:

void draw_text_on_window(window wnd, const string &text, const color &clr, double x, double y)

Draw Text On Window

Parameters:

NameTypeDescription
wndWindowThe window to draw to
textStringThe text string to be written to the window.
clrColorThe desired Color of the text to be written.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.
optsDrawing OptionsThe Drawing Options which provide extra information for how to draw the text.

Signatures:

void draw_text_on_window(window wnd, const string &text, const color &clr, double x, double y, const drawing_options &opts)

Draw Text On Window

Parameters:

NameTypeDescription
wndWindowThe window to draw to
textStringThe text string to be written to the window.
clrColorThe desired Color of the text to be written.
fntFontThe Font to be used to draw the text.
font_sizeIntegerThe size of the font which will be drawn.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.

Signatures:

void draw_text_on_window(window wnd, const string &text, const color &clr, font fnt, int font_size, double x, double y)

Draw Text On Window

Parameters:

NameTypeDescription
wndWindowThe window to draw to
textStringThe text string to be written to the window.
clrColorThe desired Color of the text to be written.
fntFontThe Font to be used to draw the text.
font_sizeIntegerThe desired size of the font.
xDoubleThe x location to draw the text.
yDoubleThe y location to draw the text.
optsDrawing OptionsThe Drawing Options which provide extra information for how to draw the text.

Signatures:

void draw_text_on_window(window wnd, const string &text, const color &clr, font fnt, int font_size, double x, double y, const drawing_options &opts)

Font Has Size

Font Has Size

Parameters:

NameTypeDescription
nameStringThe name of the Font to be checked.
font_sizeIntegerThe size to check.

Return Type: Boolean

Signatures:

bool font_has_size(const string &name, int font_size)

Font Has Size

Parameters:

NameTypeDescription
fntFontThe Font to be checked.
font_sizeIntegerThe size to check.

Return Type: Boolean

Signatures:

bool font_has_size(font fnt, int font_size)

Font Load Size

Font Load Size

Parameters:

NameTypeDescription
nameStringThe name of the Font to load the size for.
font_sizeIntegerThe desired size of the Font.

Signatures:

void font_load_size(const string &name, int font_size)

Font Load Size

Parameters:

NameTypeDescription
fntFontThe Font to load the size for.
font_sizeIntegerThe desired size of the Font.

Signatures:

void font_load_size(font fnt, int font_size)

Font Named

Parameters:

NameTypeDescription
nameStringThe name of the font to find.

Return Type: Font

Signatures:

font font_named(string name)

Free All Fonts

Signatures:

void free_all_fonts()

Free Font

Parameters:

NameTypeDescription
fntFontThe font to be freed.

Signatures:

void free_font(font fnt)

Get Font Style

Get Font Style

Parameters:

NameTypeDescription
nameStringThe name of the font to return the style of.

Return Type: Font Style

Signatures:

font_style get_font_style(const string &name)

Get Font Style

Parameters:

NameTypeDescription
fntFontThe Font to return the style of.

Return Type: Font Style

Signatures:

font_style get_font_style(font fnt)

Get System Font

Searches for and (if found) returns a default system font. Otherwise defaults to the in-built font.

Return Type: Font

Signatures:

font get_system_font()

Has Font

Has Font

Parameters:

NameTypeDescription
fntFontThe Font to check if loaded.

Return Type: Boolean

Signatures:

bool has_font(font fnt)

Has Font

Parameters:

NameTypeDescription
nameStringThe name of Font to check if loaded.

Return Type: Boolean

Signatures:

bool has_font(string name)

Load Font

Parameters:

NameTypeDescription
nameStringThe name of the Font to be loaded from file.
filenameStringThe name of the file to load the Font from.

Return Type: Font

Signatures:

font load_font(const string &name, const string &filename)

Set Font Style

Set Font Style

Parameters:

NameTypeDescription
nameStringThe name of the Font to set the style of.
styleFont StyleThe new style for the Font.

Signatures:

void set_font_style(const string &name, font_style style)

Set Font Style

Parameters:

NameTypeDescription
fntFontThe Font to set the style of.
styleFont StyleThe new style for the Font.

Signatures:

void set_font_style(font fnt, font_style style)

Text Height

Text Height

Parameters:

NameTypeDescription
textStringThe text string to check the length of.
fntStringThe font used for the text.
font_sizeIntegerThe size of the font used for the text.

Return Type: Integer

Signatures:

int text_height(const string &text, const string &fnt, int font_size)

Text Height

Parameters:

NameTypeDescription
textStringThe text string to check the length of.
fntFontThe font used for the text.
font_sizeIntegerThe size of the font used for the text.

Return Type: Integer

Signatures:

int text_height(const string &text, font fnt, int font_size)

Text Width

Text Width

Parameters:

NameTypeDescription
textStringThe text string to check the length of.
fntStringThe font used for the text.
font_sizeIntegerThe size of the font used for the text.

Return Type: Integer

Signatures:

int text_width(const string &text, const string &fnt, int font_size)

Text Width

Parameters:

NameTypeDescription
textStringThe text string to check the length of.
fntFontThe font used for the text.
font_sizeIntegerThe size of the font used for the text.

Return Type: Integer

Signatures:

int text_width(const string &text, font fnt, int font_size)

Draw Triangle

Draw Triangle

Draw a triangle onto the current window.

Parameters:

NameTypeDescription
clrColorThe color for the triangle
triTriangleThe triangles details

Signatures:

void draw_triangle(color clr, const triangle &tri)

Draw Triangle

Draw a triangle using the supplied drawing options.

Parameters:

NameTypeDescription
clrColorThe color for the triangle
triTriangleThe triangles details
optsDrawing OptionsThe drawing options

Signatures:

void draw_triangle(color clr, const triangle &tri, drawing_options opts)

Draw Triangle

Draw a triangle to the current window.

Parameters:

NameTypeDescription
clrColorThe color for the triangle
x1DoubleThe distance from the left side of the window to the first point of the triangle
y1DoubleThe distance from the top of the window to the first point of the triangle
x2DoubleThe distance from the left side of the window to the second point of the triangle
y2DoubleThe distance from the top of the window to the second point of the triangle
x3DoubleThe distance from the left side of the window to the third point of the triangle
y3DoubleThe distance from the top of the window to the third point of the triangle

Signatures:

void draw_triangle(color clr, double x1, double y1, double x2, double y2, double x3, double y3)

Draw Triangle

Draw a triangle using the supplied drawing options.

Parameters:

NameTypeDescription
clrColorThe color for the triangle
x1DoubleThe distance from the left side of the bitmap/window to the first point of the triangle
y1DoubleThe distance from the top of the bitmap/window to the first point of the triangle
x2DoubleThe distance from the left side of the bitmap/window to the second point of the triangle
y2DoubleThe distance from the top of the bitmap/window to the second point of the triangle
x3DoubleThe distance from the left side of the bitmap/window to the third point of the triangle
y3DoubleThe distance from the top of the bitmap/window to the third point of the triangle
optsDrawing OptionsThe drawing options

Signatures:

void draw_triangle(color clr, double x1, double y1, double x2, double y2, double x3, double y3, drawing_options opts)

Draw Triangle On Bitmap

Draw Triangle On Bitmap

Draw a triangle on a given bitmap, using the supplied drawing options.

Parameters:

NameTypeDescription
destinationBitmapThe bitmap which the triangle will be drawn on.
clrColorThe color for the triangle
triTriangleThe triangles details

Signatures:

void draw_triangle_on_bitmap(bitmap destination, color clr, const triangle &tri)

Draw Triangle On Bitmap

Draw a triangle on a given bitmap, using the supplied drawing options.

Parameters:

NameTypeDescription
destinationBitmapThe bitmap which the triangle will be drawn on.
clrColorThe color for the triangle
triTriangleThe triangles details
optsDrawing OptionsThe drawing options

Signatures:

void draw_triangle_on_bitmap(bitmap destination, color clr, const triangle &tri, drawing_options opts)

Draw Triangle On Bitmap

Draw a triangle to the given bitmap.

Parameters:

NameTypeDescription
destinationBitmapThe bitmap which the triangle will be drawn on.
clrColorThe color for the triangle
x1DoubleThe distance from the left side of the bitmap to the first point of the triangle
y1DoubleThe distance from the top of the bitmap to the first point of the triangle
x2DoubleThe distance from the left side of the bitmap to the second point of the triangle
y2DoubleThe distance from the top of the bitmap to the second point of the triangle
x3DoubleThe distance from the left side of the bitmap to the third point of the triangle
y3DoubleThe distance from the top of the bitmap to the third point of the triangle

Signatures:

void draw_triangle_on_bitmap(bitmap destination, color clr, double x1, double y1, double x2, double y2, double x3, double y3)

Draw Triangle On Bitmap

Draw a triangle to the given bitmap, using the supplied drawing options.

Parameters:

NameTypeDescription
destinationBitmapThe bitmap which the triangle will be drawn on.
clrColorThe color for the triangle
x1DoubleThe distance from the left side of the bitmap/bitmap to the first point of the triangle
y1DoubleThe distance from the top of the bitmap/bitmap to the first point of the triangle
x2DoubleThe distance from the left side of the bitmap/bitmap to the second point of the triangle
y2DoubleThe distance from the top of the bitmap/bitmap to the second point of the triangle
x3DoubleThe distance from the left side of the bitmap/bitmap to the third point of the triangle
y3DoubleThe distance from the top of the bitmap/bitmap to the third point of the triangle
optsDrawing OptionsThe drawing options

Signatures:

void draw_triangle_on_bitmap(bitmap destination, color clr, double x1, double y1, double x2, double y2, double x3, double y3, drawing_options opts)

Draw Triangle On Window

Draw Triangle On Window

Draw a triangle on a given window, using the supplied drawing options.

Parameters:

NameTypeDescription
destinationWindowThe window which the triangle will be drawn on.
clrColorThe color for the triangle
triTriangleThe triangles details

Signatures:

void draw_triangle_on_window(window destination, color clr, const triangle &tri)

Draw Triangle On Window

Draw a triangle on a given window, using the supplied drawing options.

Parameters:

NameTypeDescription
destinationWindowThe window which the triangle will be drawn on.
clrColorThe color for the triangle
triTriangleThe triangles details
optsDrawing OptionsThe drawing options

Signatures:

void draw_triangle_on_window(window destination, color clr, const triangle &tri, drawing_options opts)

Draw Triangle On Window

Draw a triangle to the given window.

Parameters:

NameTypeDescription
destinationWindowThe window which the triangle will be drawn on.
clrColorThe color for the triangle
x1DoubleThe distance from the left side of the window to the first point of the triangle
y1DoubleThe distance from the top of the window to the first point of the triangle
x2DoubleThe distance from the left side of the window to the second point of the triangle
y2DoubleThe distance from the top of the window to the second point of the triangle
x3DoubleThe distance from the left side of the window to the third point of the triangle
y3DoubleThe distance from the top of the window to the third point of the triangle

Signatures:

void draw_triangle_on_window(window destination, color clr, double x1, double y1, double x2, double y2, double x3, double y3)

Draw Triangle On Window

Draw a triangle to the given window, using the supplied drawing options.

Parameters:

NameTypeDescription
destinationWindowThe window which the triangle will be drawn on.
clrColorThe color for the triangle
x1DoubleThe distance from the left side of the bitmap/window to the first point of the triangle
y1DoubleThe distance from the top of the bitmap/window to the first point of the triangle
x2DoubleThe distance from the left side of the bitmap/window to the second point of the triangle
y2DoubleThe distance from the top of the bitmap/window to the second point of the triangle
x3DoubleThe distance from the left side of the bitmap/window to the third point of the triangle
y3DoubleThe distance from the top of the bitmap/window to the third point of the triangle
optsDrawing OptionsThe drawing options

Signatures:

void draw_triangle_on_window(window destination, color clr, double x1, double y1, double x2, double y2, double x3, double y3, drawing_options opts)

Fill Triangle

Fill Triangle

Draw a triangle onto the current window.

Parameters:

NameTypeDescription
clrColorThe color for the triangle
triTriangleThe triangles details

Signatures:

void fill_triangle(color clr, const triangle &tri)

Fill Triangle

Fill a triangle using the supplied drawing options.

Parameters:

NameTypeDescription
clrColorThe color for the triangle
triTriangleThe triangles details
optsDrawing OptionsThe drawing options

Signatures:

void fill_triangle(color clr, const triangle &tri, drawing_options opts)

Fill Triangle

Fills a triangle on the current window.

Parameters:

NameTypeDescription
clrColorThe color for the triangle
x1DoubleThe distance from the left side of the window to the first point of the triangle
y1DoubleThe distance from the top of the window to the first point of the triangle
x2DoubleThe distance from the left side of the window to the second point of the triangle
y2DoubleThe distance from the top of the window to the second point of the triangle
x3DoubleThe distance from the left side of the window to the third point of the triangle
y3DoubleThe distance from the top of the window to the third point of the triangle

Signatures:

void fill_triangle(color clr, double x1, double y1, double x2, double y2, double x3, double y3)

Fill Triangle

Fills a triangle using the supplied drawing options.

Parameters:

NameTypeDescription
clrColorThe color for the triangle
x1DoubleThe distance from the left side of the bitmap/window to the first point of the triangle
y1DoubleThe distance from the top of the bitmap/window to the first point of the triangle
x2DoubleThe distance from the left side of the bitmap/window to the second point of the triangle
y2DoubleThe distance from the top of the bitmap/window to the second point of the triangle
x3DoubleThe distance from the left side of the bitmap/window to the third point of the triangle
y3DoubleThe distance from the top of the bitmap/window to the third point of the triangle
optsDrawing OptionsThe drawing options

Signatures:

void fill_triangle(color clr, double x1, double y1, double x2, double y2, double x3, double y3, drawing_options opts)

Fill Triangle On Bitmap

Fill Triangle On Bitmap

Fill a triangle on a given bitmap

Parameters:

NameTypeDescription
destinationBitmapThe bitmap which the triangle will be drawn on.
clrColorThe color for the triangle
triTriangleThe triangles details

Signatures:

void fill_triangle_on_bitmap(bitmap destination, color clr, const triangle &tri)

Fill Triangle On Bitmap

Fill a triangle on a given bitmap, using given drawing options

Parameters:

NameTypeDescription
destinationBitmapThe bitmap which the triangle will be drawn on.
clrColorThe color for the triangle
triTriangleThe triangles details
optsDrawing OptionsThe drawing options

Signatures:

void fill_triangle_on_bitmap(bitmap destination, color clr, const triangle &tri, drawing_options opts)

Fill Triangle On Bitmap

Fill a triangle on a given bitmap

Parameters:

NameTypeDescription
destinationBitmapThe bitmap which the triangle will be drawn on.
clrColorThe color for the triangle
x1DoubleThe distance from the left side of the bitmap to the first point of the triangle
y1DoubleThe distance from the top of the bitmap to the first point of the triangle
x2DoubleThe distance from the left side of the bitmap to the second point of the triangle
y2DoubleThe distance from the top of the bitmap to the second point of the triangle
x3DoubleThe distance from the left side of the bitmap to the third point of the triangle
y3DoubleThe distance from the top of the bitmap to the third point of the triangle

Signatures:

void fill_triangle_on_bitmap(bitmap destination, color clr, double x1, double y1, double x2, double y2, double x3, double y3)

Fill Triangle On Bitmap

Fill a triangle on a given bitmap, using the supplied drawing options.

Parameters:

NameTypeDescription
destinationBitmapThe bitmap which the triangle will be drawn on.
clrColorThe color for the triangle
x1DoubleThe distance from the left side of the bitmap/bitmap to the first point of the triangle
y1DoubleThe distance from the top of the bitmap/bitmap to the first point of the triangle
x2DoubleThe distance from the left side of the bitmap/bitmap to the second point of the triangle
y2DoubleThe distance from the top of the bitmap/bitmap to the second point of the triangle
x3DoubleThe distance from the left side of the bitmap/bitmap to the third point of the triangle
y3DoubleThe distance from the top of the bitmap/bitmap to the third point of the triangle
optsDrawing OptionsThe drawing options

Signatures:

void fill_triangle_on_bitmap(bitmap destination, color clr, double x1, double y1, double x2, double y2, double x3, double y3, drawing_options opts)

Fill Triangle On Window

Fill Triangle On Window

Fill a triangle on a given window

Parameters:

NameTypeDescription
destinationWindowThe window which the triangle will be drawn on.
clrColorThe color for the triangle
triTriangleThe triangles details

Signatures:

void fill_triangle_on_window(window destination, color clr, const triangle &tri)

Fill Triangle On Window

Fill a triangle on a given window, using given drawing options

Parameters:

NameTypeDescription
destinationWindowThe window which the triangle will be drawn on.
clrColorThe color for the triangle
triTriangleThe triangles details
optsDrawing OptionsThe drawing options

Signatures:

void fill_triangle_on_window(window destination, color clr, const triangle &tri, drawing_options opts)

Fill Triangle On Window

Fill a triangle on a given window

Parameters:

NameTypeDescription
destinationWindowThe window which the triangle will be drawn on.
clrColorThe color for the triangle
x1DoubleThe distance from the left side of the window to the first point of the triangle
y1DoubleThe distance from the top of the window to the first point of the triangle
x2DoubleThe distance from the left side of the window to the second point of the triangle
y2DoubleThe distance from the top of the window to the second point of the triangle
x3DoubleThe distance from the left side of the window to the third point of the triangle
y3DoubleThe distance from the top of the window to the third point of the triangle

Signatures:

void fill_triangle_on_window(window destination, color clr, double x1, double y1, double x2, double y2, double x3, double y3)

Fill Triangle On Window

Fill a triangle on a given window, using the supplied drawing options.

Parameters:

NameTypeDescription
destinationWindowThe window which the triangle will be drawn on.
clrColorThe color for the triangle
x1DoubleThe distance from the left side of the bitmap/window to the first point of the triangle
y1DoubleThe distance from the top of the bitmap/window to the first point of the triangle
x2DoubleThe distance from the left side of the bitmap/window to the second point of the triangle
y2DoubleThe distance from the top of the bitmap/window to the second point of the triangle
x3DoubleThe distance from the left side of the bitmap/window to the third point of the triangle
y3DoubleThe distance from the top of the bitmap/window to the third point of the triangle
optsDrawing OptionsThe drawing options

Signatures:

void fill_triangle_on_window(window destination, color clr, double x1, double y1, double x2, double y2, double x3, double y3, drawing_options opts)