Images
Description
The Images module contains the code that relates to the manipulating and querying of bitmap structures.
Bitmap Cell Circle
Creates a circle from within a cell in a bitmap, uses the larger of the width and height.
- Bitmap Cell Circle (bmp, const pt) : Circle [show]
Creates a circle from within a cell in a bitmap, uses the larger of the width and height.
- Parameters:
- Returns:
- Circle :
- Signatures by Language:
- C/C++: circle bitmap_cell_circle(bitmap bmp, const point2d *pt);
- C/C++: circle bitmap_cell_circle_byval(bitmap bmp, const point2d pt);
- C++: circle bitmap_cell_circle(bitmap bmp, const point2d &pt);
- Pascal: function BitmapCellCircle(bmp: Bitmap; const pt: Point2D): Circle;
- Bitmap Cell Circle (bmp, x, y) : Circle [show]
Creates a circle from within a cell in a bitmap, uses the larger of the width and height.
- Parameters:
-
- bmp : Bitmap
- x : Longint
- y : Longint
- Returns:
- Circle :
- Signatures by Language:
- C/C++: circle bitmap_cell_circle_xy(bitmap bmp, int32_t x, int32_t y);
- C++: circle bitmap_cell_circle(bitmap bmp, int32_t x, int32_t y);
- Pascal: function BitmapCellCircle(bmp: Bitmap; x: Longint; y: Longint): Circle;
- source code
- lib name: BitmapCellCircleXY
Bitmap Cell Columns
Returns the number of columns of cells in the specified bitmap.
Bitmap Cell Count
Returns the number of cells in the specified bitmap.
Bitmap Cell Height
Returns the height of a cell within the bitmap.
Bitmap Cell Of
Returns a bitmap cell for the cell of the indicated bitmap.
- Bitmap Cell Of (bmp, cell) : BitmapCell [show]
Returns a bitmap cell for the cell of the indicated bitmap.
- Parameters:
-
- bmp : Bitmap
- cell : Longint
- Returns:
- BitmapCell :
- Signatures by Language:
- C/C++: bitmap_cell bitmap_cell_of(bitmap bmp, int32_t cell);
- Pascal: function BitmapCellOf(bmp: Bitmap; cell: Longint): BitmapCell;
Bitmap Cell Rectangle
Returns a bounding rectangle for a cell of the bitmap at the origin.
- Bitmap Cell Rectangle (bmp) : Rectangle [show]
Returns a bounding rectangle for a cell of the bitmap at the origin.
- Parameters:
-
- bmp : Bitmap
- Returns:
- Rectangle :
- Signatures by Language:
- C/C++: rectangle bitmap_cell_rectangle_at_origin(bitmap bmp);
- C++: rectangle bitmap_cell_rectangle(bitmap bmp);
- Pascal: function BitmapCellRectangle(bmp: Bitmap): Rectangle;
- source code
- lib name: BitmapCellRectangleAtOrigin
- Bitmap Cell Rectangle (const pt, bmp) : Rectangle [show]
Returns a rectangle for a cell of the bitmap at the indicated point.
- Parameters:
- Returns:
- Rectangle :
- Signatures by Language:
- C/C++: rectangle bitmap_cell_rectangle(const point2d *pt, bitmap bmp);
- C/C++: rectangle bitmap_cell_rectangle_byval(const point2d pt, bitmap bmp);
- C++: rectangle bitmap_cell_rectangle(const point2d &pt, bitmap bmp);
- Pascal: function BitmapCellRectangle(const pt: Point2D; bmp: Bitmap): Rectangle;
- Bitmap Cell Rectangle (x, y, bmp) : Rectangle [show]
Returns a rectangle for a cell of the bitmap at the indicated point.
- Parameters:
-
- x : Single
- y : Single
- bmp : Bitmap
- Returns:
- Rectangle :
- Signatures by Language:
- C/C++: rectangle bitmap_cell_rectangle_xy(float x, float y, bitmap bmp);
- C++: rectangle bitmap_cell_rectangle(float x, float y, bitmap bmp);
- Pascal: function BitmapCellRectangle(x: Single; y: Single; bmp: Bitmap): Rectangle;
- source code
- lib name: BitmapCellRectangleXY
Bitmap Cell Rows
Returns the number of rows of cells in the specified bitmap.
Bitmap Cell Width
Returns the width of a cell within the bitmap.
Bitmap Circle
Creates a circle from within a bitmap, uses the larger of the width and height.
- Bitmap Circle (bmp, const pt) : Circle [show]
Creates a circle from within a bitmap, uses the larger of the width and height.
- Parameters:
- Returns:
- Circle :
- Signatures by Language:
- C/C++: circle bitmap_circle(bitmap bmp, const point2d *pt);
- C/C++: circle bitmap_circle_byval(bitmap bmp, const point2d pt);
- C++: circle bitmap_circle(bitmap bmp, const point2d &pt);
- Pascal: function BitmapCircle(bmp: Bitmap; const pt: Point2D): Circle;
- Bitmap Circle (bmp, x, y) : Circle [show]
Creates a circle from within a bitmap, uses the larger of the width and height.
- Parameters:
-
- bmp : Bitmap
- x : Longint
- y : Longint
- Returns:
- Circle :
- Signatures by Language:
- C/C++: circle bitmap_circle_xy(bitmap bmp, int32_t x, int32_t y);
- C++: circle bitmap_circle(bitmap bmp, int32_t x, int32_t y);
- Pascal: function BitmapCircle(bmp: Bitmap; x: Longint; y: Longint): Circle;
- source code
- lib name: BitmapCircleXY
Bitmap Filename
Returns the Filename of the bitmap
Bitmap Height
Returns the height of the bitmap cell.
- Bitmap Height (const bmp) : Longint [show]
Returns the height of the bitmap cell.
- Parameters:
-
- bmp : BitmapCell
- Returns:
- Longint :
- Signatures by Language:
- C/C++: int32_t bitmap_height_for_cell(const bitmap_cell *bmp);
- C/C++: int32_t bitmap_height_for_cell_byval(const bitmap_cell bmp);
- C++: int32_t bitmap_height(const bitmap_cell &bmp);
- Pascal: function BitmapHeight(const bmp: BitmapCell): Longint;
- source code
- lib name: BitmapHeightForCell
- Bitmap Height (bmp) : Longint [show]
Returns the height of the entire bitmap.
- Parameters:
-
- bmp : Bitmap
- Returns:
- Longint :
- Signatures by Language:
- C/C++: int32_t bitmap_height(bitmap bmp);
- Pascal: function BitmapHeight(bmp: Bitmap): Longint;
Bitmap Name
Returns the name of the bitmap
Bitmap Named
Returns the Bitmap that has been loaded with the specified name, see LoadBitmapNamed.
- Bitmap Named (name) : Bitmap [show]
Returns the Bitmap that has been loaded with the specified name, see LoadBitmapNamed.
- Parameters:
-
- name : String
- Returns:
- Bitmap :
- Signatures by Language:
- C/C++: bitmap bitmap_named(const char *name);
- Pascal: function BitmapNamed(name: String): Bitmap;
Bitmap Rectangle
Returns a bounding rectangle for the bitmap, at the origin.
- Bitmap Rectangle (bmp) : Rectangle [show]
Returns a bounding rectangle for the bitmap, at the origin.
- Parameters:
-
- bmp : Bitmap
- Returns:
- Rectangle :
- Signatures by Language:
- C/C++: rectangle bitmap_rect_at_origin(bitmap bmp);
- C++: rectangle bitmap_rectangle(bitmap bmp);
- Pascal: function BitmapRectangle(bmp: Bitmap): Rectangle;
- source code
- lib name: BitmapRectAtOrigin
- Bitmap Rectangle (x, y, bmp) : Rectangle [show]
Returns a bounding rectangle for the bitmap.
- Parameters:
-
- x : Single
- y : Single
- bmp : Bitmap
- Returns:
- Rectangle :
- Signatures by Language:
- C/C++: rectangle bitmap_rect_xy(float x, float y, bitmap bmp);
- C++: rectangle bitmap_rectangle(float x, float y, bitmap bmp);
- Pascal: function BitmapRectangle(x: Single; y: Single; bmp: Bitmap): Rectangle;
- source code
- lib name: BitmapRectXY
Bitmap Rectangle Of Cell
Returns a rectangle for the location of the indicated cell within the bitmap.
Bitmap Set Cell Details
This is used to define the number of cells in a bitmap, and their width and height. The cells are traversed in rows so that the format would be [0 - 1 - 2] [3 - 4 - 5] etc. The count can be used to restrict which of the parts of the bitmap actually contain cells that can be drawn.
- Bitmap Set Cell Details (bmp, width, height, columns, rows, count) [show]
This is used to define the number of cells in a bitmap, and their width and height. The cells are traversed in rows so that the format would be [0 - 1 - 2] [3 - 4 - 5] etc. The count can be used to restrict which of the parts of the bitmap actually contain cells that can be drawn.
- Parameters:
-
- bmp : Bitmap
- width : Longint
- height : Longint
- columns : Longint
- rows : Longint
- count : Longint
- Signatures by Language:
- C/C++: void bitmap_set_cell_details(bitmap bmp, int32_t width, int32_t height, int32_t columns, int32_t rows, int32_t count);
- Pascal: procedure BitmapSetCellDetails(bmp: Bitmap; width: Longint; height: Longint; columns: Longint; rows: Longint; count: Longint);
Bitmap Width
Returns the width of the entire bitmap.
- Bitmap Width (bmp) : Longint [show]
Returns the width of the entire bitmap.
- Parameters:
-
- bmp : Bitmap
- Returns:
- Longint :
- Signatures by Language:
- C/C++: int32_t bitmap_width(bitmap bmp);
- Pascal: function BitmapWidth(bmp: Bitmap): Longint;
- Bitmap Width (const bmp) : Longint [show]
Returns the width of the bitmap cell.
- Parameters:
-
- bmp : BitmapCell
- Returns:
- Longint :
- Signatures by Language:
- C/C++: int32_t bitmap_width_for_cell(const bitmap_cell *bmp);
- C/C++: int32_t bitmap_width_for_cell_byval(const bitmap_cell bmp);
- C++: int32_t bitmap_width(const bitmap_cell &bmp);
- Pascal: function BitmapWidth(const bmp: BitmapCell): Longint;
- source code
- lib name: BitmapWidthForCell
Bitmaps Interchangable
Are the two bitmaps of a similar format that they could be used in place of each other. This returns true if they have the same cell details (count, width, and height).
- Bitmaps Interchangable (bmp1, bmp2) : Boolean [show]
Are the two bitmaps of a similar format that they could be used in place of each other. This returns true if they have the same cell details (count, width, and height).
Clear Surface
Clears the drawing on the Bitmap to black.
- Clear Surface (dest) [show]
Clears the drawing on the Bitmap to black.
- Parameters:
-
- dest : Bitmap
- Signatures by Language:
- C/C++: void clear_surface_to_black(bitmap dest);
- C++: void clear_surface(bitmap dest);
- Pascal: procedure ClearSurface(dest: Bitmap);
- source code
- lib name: ClearSurfaceToBlack
- Clear Surface (dest, toColor) [show]
Clear the drawing on the Bitmap to the passed in color.
Combine Into Grid
Creates a new bitmap by combining together the bitmaps from an array. The bitmaps will be arranged in the number of columns specified, the number of rows will be determined by the number of columns specified. This can be used to create a bitmap that can be used by a Sprite for animation.
- Combine Into Grid (const bitmaps, cols) : Bitmap [show]
Creates a new bitmap by combining together the bitmaps from an array. The bitmaps will be arranged in the number of columns specified, the number of rows will be determined by the number of columns specified. This can be used to create a bitmap that can be used by a Sprite for animation.
- Parameters:
-
- bitmaps : BitmapArray
- cols : Longint
- Returns:
- Bitmap :
- Signatures by Language:
- C/C++: bitmap combine_into_grid(const bitmap *bitmaps, int32_t cols, int32_t bitmaps_len);
- Pascal: function CombineIntoGrid(const bitmaps: BitmapArray; cols: Longint): Bitmap;
Create Bitmap
Creates a bitmap in memory that is the specified width and height (in pixels). The new bitmap is initially transparent and can be used as the target for various drawing operations. Once you have drawn the desired image onto the bitmap you can call OptimiseBitmap to optimise the surface.
- Create Bitmap (width, height) : Bitmap [show]
Creates a bitmap in memory that is the specified width and height (in pixels). The new bitmap is initially transparent and can be used as the target for various drawing operations. Once you have drawn the desired image onto the bitmap you can call OptimiseBitmap to optimise the surface.
- Parameters:
-
- width : Longint
- height : Longint
- Returns:
- Bitmap :
- Signatures by Language:
- C/C++: bitmap create_bitmap(int32_t width, int32_t height);
- Pascal: function CreateBitmap(width: Longint; height: Longint): Bitmap;
- Create Bitmap (name, width, height) : Bitmap [show]
Creates a bitmap in memory that is the specified width and height (in pixels). The new bitmap is initially transparent and can be used as the target for various drawing operations. Once you have drawn the desired image onto the bitmap you can call OptimiseBitmap to optimise the surface.
- Parameters:
-
- name : String
- width : Longint
- height : Longint
- Returns:
- Bitmap :
- Signatures by Language:
- C/C++: bitmap create_bitmap_named(const char *name, int32_t width, int32_t height);
- C++: bitmap create_bitmap(const char *name, int32_t width, int32_t height);
- Pascal: function CreateBitmap(name: String; width: Longint; height: Longint): Bitmap;
- source code
- lib name: CreateBitmapNamed
Draw Bitmap
Draw the passed in bitmap onto the game.
- Draw Bitmap (src, x, y) [show]
Draw the passed in bitmap onto the game.
- Parameters:
-
- src : Bitmap
- x : Single
- y : Single
- Signatures by Language:
- C/C++: void draw_bitmap(bitmap src, float x, float y);
- Pascal: procedure DrawBitmap(src: Bitmap; x: Single; y: Single);
- Draw Bitmap (name, x, y) [show]
Draw the named bitmap onto the game.
- Parameters:
-
- name : String
- x : Single
- y : Single
- Signatures by Language:
- C/C++: void draw_bitmap_named(const char *name, float x, float y);
- C++: void draw_bitmap(const char *name, float x, float y);
- Pascal: procedure DrawBitmap(name: String; x: Single; y: Single);
- source code
- lib name: DrawBitmapNamed
- Draw Bitmap (name, const position) [show]
Draw the passed in bitmap onto the game.
- Parameters:
-
- name : String
- position : Point2D
- Signatures by Language:
- C/C++: void draw_bitmap_named_at_point(const char *name, const point2d *position);
- C/C++: void draw_bitmap_named_at_point_byval(const char *name, const point2d position);
- C++: void draw_bitmap(const char *name, const point2d &position);
- Pascal: procedure DrawBitmap(name: String; const position: Point2D);
- source code
- lib name: DrawBitmapNamedAtPoint
- Draw Bitmap (src, const position) [show]
Draw the passed in bitmap onto the game.
- Parameters:
- Signatures by Language:
- C/C++: void draw_bitmap_at_point(bitmap src, const point2d *position);
- C/C++: void draw_bitmap_at_point_byval(bitmap src, const point2d position);
- C++: void draw_bitmap(bitmap src, const point2d &position);
- Pascal: procedure DrawBitmap(src: Bitmap; const position: Point2D);
- source code
- lib name: DrawBitmapAtPoint
- Draw Bitmap (dest, src, const position) [show]
Draws the source bitmap onto the destination
- Parameters:
- Signatures by Language:
- C/C++: void draw_bitmap_at_point_onto(bitmap dest, bitmap src, const point2d *position);
- C/C++: void draw_bitmap_at_point_onto_byval(bitmap dest, bitmap src, const point2d position);
- C++: void draw_bitmap(bitmap dest, bitmap src, const point2d &position);
- Pascal: procedure DrawBitmap(dest: Bitmap; src: Bitmap; const position: Point2D);
- source code
- lib name: DrawBitmapAtPointOnto
- Draw Bitmap (dest, src, x, y) [show]
Draws the source bitmap onto the destination.
- Parameters:
- Signatures by Language:
- C/C++: void draw_bitmap_onto(bitmap dest, bitmap src, int32_t x, int32_t y);
- C++: void draw_bitmap(bitmap dest, bitmap src, int32_t x, int32_t y);
- Pascal: procedure DrawBitmap(dest: Bitmap; src: Bitmap; x: Longint; y: Longint);
- source code
- lib name: DrawBitmapOnto
Draw Bitmap Cell
Draw the cell of the passed in bitmap onto the game.
- Draw Bitmap Cell (const src, const position) [show]
Draw the cell of the passed in bitmap onto the game.
- Parameters:
-
- src : BitmapCell
- position : Point2D
- Signatures by Language:
- C/C++: void draw_bitmap_cell_at_point(const bitmap_cell *src, const point2d *position);
- C/C++: void draw_bitmap_cell_at_point_byval(const bitmap_cell src, const point2d position);
- C++: void draw_bitmap_cell(const bitmap_cell &src, const point2d &position);
- Pascal: procedure DrawBitmapCell(const src: BitmapCell; const position: Point2D);
- source code
- lib name: DrawBitmapCellAtPoint
- Draw Bitmap Cell (const src, x, y) [show]
Draw the cell of the passed in bitmap onto the game.
- Parameters:
-
- src : BitmapCell
- x : Single
- y : Single
- Signatures by Language:
- C/C++: void draw_bitmap_cell(const bitmap_cell *src, float x, float y);
- C/C++: void draw_bitmap_cell_byval(const bitmap_cell src, float x, float y);
- C++: void draw_bitmap_cell(const bitmap_cell &src, float x, float y);
- Pascal: procedure DrawBitmapCell(const src: BitmapCell; x: Single; y: Single);
- Draw Bitmap Cell (dest, const src, const position) [show]
Draws the cell of the source bitmap onto the destination
- Parameters:
-
- dest : Bitmap
- src : BitmapCell
- position : Point2D
- Signatures by Language:
- C/C++: void draw_bitmap_cell_at_point_onto(bitmap dest, const bitmap_cell *src, const point2d *position);
- C/C++: void draw_bitmap_cell_at_point_onto_byval(bitmap dest, const bitmap_cell src, const point2d position);
- C++: void draw_bitmap_cell(bitmap dest, const bitmap_cell &src, const point2d &position);
- Pascal: procedure DrawBitmapCell(dest: Bitmap; const src: BitmapCell; const position: Point2D);
- source code
- lib name: DrawBitmapCellAtPointOnto
- Draw Bitmap Cell (dest, const src, x, y) [show]
Draws the cell of the source bitmap onto the destination.
- Parameters:
-
- dest : Bitmap
- src : BitmapCell
- x : Longint
- y : Longint
- Signatures by Language:
- C/C++: void draw_bitmap_cell_onto(bitmap dest, const bitmap_cell *src, int32_t x, int32_t y);
- C/C++: void draw_bitmap_cell_onto_byval(bitmap dest, const bitmap_cell src, int32_t x, int32_t y);
- C++: void draw_bitmap_cell(bitmap dest, const bitmap_cell &src, int32_t x, int32_t y);
- Pascal: procedure DrawBitmapCell(dest: Bitmap; const src: BitmapCell; x: Longint; y: Longint);
- source code
- lib name: DrawBitmapCellOnto
Draw Bitmap Cell On Screen
Draw the cell of the bitmap onto the screen.
- Draw Bitmap Cell On Screen (const src, const position) [show]
Draw the cell of the bitmap onto the screen.
- Parameters:
-
- src : BitmapCell
- position : Point2D
- Signatures by Language:
- C/C++: void draw_bitmap_cell_at_point_on_screen(const bitmap_cell *src, const point2d *position);
- C/C++: void draw_bitmap_cell_at_point_on_screen_byval(const bitmap_cell src, const point2d position);
- C++: void draw_bitmap_cell_on_screen(const bitmap_cell &src, const point2d &position);
- Pascal: procedure DrawBitmapCellOnScreen(const src: BitmapCell; const position: Point2D);
- source code
- lib name: DrawBitmapCellAtPointOnScreen
- Draw Bitmap Cell On Screen (const src, x, y) [show]
Draw the cell of the bitmap onto the screen.
- Parameters:
-
- src : BitmapCell
- x : Longint
- y : Longint
- Signatures by Language:
- C/C++: void draw_bitmap_cell_on_screen(const bitmap_cell *src, int32_t x, int32_t y);
- C/C++: void draw_bitmap_cell_on_screen_byval(const bitmap_cell src, int32_t x, int32_t y);
- C++: void draw_bitmap_cell_on_screen(const bitmap_cell &src, int32_t x, int32_t y);
- Pascal: procedure DrawBitmapCellOnScreen(const src: BitmapCell; x: Longint; y: Longint);
Draw Bitmap On Screen
Draw the bitmap onto the screen.
- Draw Bitmap On Screen (src, const position) [show]
Draw the bitmap onto the screen.
- Parameters:
- Signatures by Language:
- C/C++: void draw_bitmap_at_point_on_screen(bitmap src, const point2d *position);
- C/C++: void draw_bitmap_at_point_on_screen_byval(bitmap src, const point2d position);
- C++: void draw_bitmap_on_screen(bitmap src, const point2d &position);
- Pascal: procedure DrawBitmapOnScreen(src: Bitmap; const position: Point2D);
- source code
- lib name: DrawBitmapAtPointOnScreen
- Draw Bitmap On Screen (src, x, y) [show]
Draw the bitmap onto the screen.
- Parameters:
-
- src : Bitmap
- x : Longint
- y : Longint
- Signatures by Language:
- C/C++: void draw_bitmap_on_screen(bitmap src, int32_t x, int32_t y);
- Pascal: procedure DrawBitmapOnScreen(src: Bitmap; x: Longint; y: Longint);
Draw Bitmap Part
Draw part of a bitmap onto the game.
- Draw Bitmap Part (src, const source, const position) [show]
Draw part of a bitmap onto the game.
- Parameters:
- Signatures by Language:
- C/C++: void draw_bitmap_part_from_rect_at_point(bitmap src, const rectangle *source, const point2d *position);
- C/C++: void draw_bitmap_part_from_rect_at_point_byval(bitmap src, const rectangle source, const point2d position);
- C++: void draw_bitmap_part(bitmap src, const rectangle &source, const point2d &position);
- Pascal: procedure DrawBitmapPart(src: Bitmap; const source: Rectangle; const position: Point2D);
- source code
- lib name: DrawBitmapPartFromRectAtPoint
- Draw Bitmap Part (src, const source, x, y) [show]
Draw part of a bitmap onto the game
- Parameters:
- Signatures by Language:
- C/C++: void draw_bitmap_part_from_rect(bitmap src, const rectangle *source, float x, float y);
- C/C++: void draw_bitmap_part_from_rect_byval(bitmap src, const rectangle source, float x, float y);
- C++: void draw_bitmap_part(bitmap src, const rectangle &source, float x, float y);
- Pascal: procedure DrawBitmapPart(src: Bitmap; const source: Rectangle; x: Single; y: Single);
- source code
- lib name: DrawBitmapPartFromRect
- Draw Bitmap Part (dest, src, const source, const position) [show]
Draw part of the source bitmap onto the destination
- Parameters:
- Signatures by Language:
- C/C++: void draw_bitmap_part_from_rect_at_point_onto(bitmap dest, bitmap src, const rectangle *source, const point2d *position);
- C/C++: void draw_bitmap_part_from_rect_at_point_onto_byval(bitmap dest, bitmap src, const rectangle source, const point2d position);
- C++: void draw_bitmap_part(bitmap dest, bitmap src, const rectangle &source, const point2d &position);
- Pascal: procedure DrawBitmapPart(dest: Bitmap; src: Bitmap; const source: Rectangle; const position: Point2D);
- source code
- lib name: DrawBitmapPartFromRectAtPointOnto
- Draw Bitmap Part (dest, src, const source, x, y) [show]
Draw part of the source bitmap onto the destination.
- Parameters:
- Signatures by Language:
- C/C++: void draw_bitmap_part_from_rect_onto(bitmap dest, bitmap src, const rectangle *source, int32_t x, int32_t y);
- C/C++: void draw_bitmap_part_from_rect_onto_byval(bitmap dest, bitmap src, const rectangle source, int32_t x, int32_t y);
- C++: void draw_bitmap_part(bitmap dest, bitmap src, const rectangle &source, int32_t x, int32_t y);
- Pascal: procedure DrawBitmapPart(dest: Bitmap; src: Bitmap; const source: Rectangle; x: Longint; y: Longint);
- source code
- lib name: DrawBitmapPartFromRectOnto
- Draw Bitmap Part (src, srcX, srcY, srcW, srcH, x, y) [show]
Draw part of a bitmap onto the game
- Parameters:
-
- src : Bitmap
- srcX : Longint
- srcY : Longint
- srcW : Longint
- srcH : Longint
- x : Single
- y : Single
- Signatures by Language:
- C/C++: void draw_bitmap_part(bitmap src, int32_t srcX, int32_t srcY, int32_t srcW, int32_t srcH, float x, float y);
- Pascal: procedure DrawBitmapPart(src: Bitmap; srcX: Longint; srcY: Longint; srcW: Longint; srcH: Longint; x: Single; y: Single);
- Draw Bitmap Part (dest, src, srcX, srcY, srcW, srcH, x, y) [show]
Draw part of the source onto the desitination.
- Parameters:
- Signatures by Language:
- C/C++: void draw_bitmap_part_onto(bitmap dest, bitmap src, int32_t srcX, int32_t srcY, int32_t srcW, int32_t srcH, int32_t x, int32_t y);
- C++: void draw_bitmap_part(bitmap dest, bitmap src, int32_t srcX, int32_t srcY, int32_t srcW, int32_t srcH, int32_t x, int32_t y);
- Pascal: procedure DrawBitmapPart(dest: Bitmap; src: Bitmap; srcX: Longint; srcY: Longint; srcW: Longint; srcH: Longint; x: Longint; y: Longint);
- source code
- lib name: DrawBitmapPartOnto
Draw Bitmap Part On Screen
Draw part of the bitmap on the screen.
- Draw Bitmap Part On Screen (src, const source, const position) [show]
Draw part of the bitmap on the screen.
- Parameters:
- Signatures by Language:
- C/C++: void draw_bitmap_part_from_rect_at_point_on_screen(bitmap src, const rectangle *source, const point2d *position);
- C/C++: void draw_bitmap_part_from_rect_at_point_on_screen_byval(bitmap src, const rectangle source, const point2d position);
- C++: void draw_bitmap_part_on_screen(bitmap src, const rectangle &source, const point2d &position);
- Pascal: procedure DrawBitmapPartOnScreen(src: Bitmap; const source: Rectangle; const position: Point2D);
- source code
- lib name: DrawBitmapPartFromRectAtPointOnScreen
- Draw Bitmap Part On Screen (src, const source, x, y) [show]
Draw part of the bitmap on the screen.
- Parameters:
- Signatures by Language:
- C/C++: void draw_bitmap_part_from_rect_on_screen(bitmap src, const rectangle *source, int32_t x, int32_t y);
- C/C++: void draw_bitmap_part_from_rect_on_screen_byval(bitmap src, const rectangle source, int32_t x, int32_t y);
- C++: void draw_bitmap_part_on_screen(bitmap src, const rectangle &source, int32_t x, int32_t y);
- Pascal: procedure DrawBitmapPartOnScreen(src: Bitmap; const source: Rectangle; x: Longint; y: Longint);
- source code
- lib name: DrawBitmapPartFromRectOnScreen
- Draw Bitmap Part On Screen (src, srcX, srcY, srcW, srcH, x, y) [show]
Draw part of the bitmap on the screen.
- Parameters:
-
- src : Bitmap
- srcX : Longint
- srcY : Longint
- srcW : Longint
- srcH : Longint
- x : Longint
- y : Longint
- Signatures by Language:
- C/C++: void draw_bitmap_part_on_screen(bitmap src, int32_t srcX, int32_t srcY, int32_t srcW, int32_t srcH, int32_t x, int32_t y);
- Pascal: procedure DrawBitmapPartOnScreen(src: Bitmap; srcX: Longint; srcY: Longint; srcW: Longint; srcH: Longint; x: Longint; y: Longint);
Draw Cell
Draw a cell from a bitmap onto the game.
- Draw Cell (src, cell, const position) [show]
Draw a cell from a bitmap onto the game.
- Parameters:
- Signatures by Language:
- C/C++: void draw_cell(bitmap src, int32_t cell, const point2d *position);
- C/C++: void draw_cell_byval(bitmap src, int32_t cell, const point2d position);
- C++: void draw_cell(bitmap src, int32_t cell, const point2d &position);
- Pascal: procedure DrawCell(src: Bitmap; cell: Longint; const position: Point2D);
- Draw Cell (dest, src, cell, const position) [show]
Draw a cell from a bitmap onto the destination.
- Parameters:
- Signatures by Language:
- C/C++: void draw_cell_onto(bitmap dest, bitmap src, int32_t cell, const point2d *position);
- C/C++: void draw_cell_onto_byval(bitmap dest, bitmap src, int32_t cell, const point2d position);
- C++: void draw_cell(bitmap dest, bitmap src, int32_t cell, const point2d &position);
- Pascal: procedure DrawCell(dest: Bitmap; src: Bitmap; cell: Longint; const position: Point2D);
- source code
- lib name: DrawCellOnto
- Draw Cell (src, cell, x, y) [show]
Draw a cell from a bitmap onto the game.
- Parameters:
-
- src : Bitmap
- cell : Longint
- x : Single
- y : Single
- Signatures by Language:
- C/C++: void draw_cell_xy(bitmap src, int32_t cell, float x, float y);
- C++: void draw_cell(bitmap src, int32_t cell, float x, float y);
- Pascal: procedure DrawCell(src: Bitmap; cell: Longint; x: Single; y: Single);
- source code
- lib name: DrawCellXY
- Draw Cell (dest, src, cell, x, y) [show]
Draw a cell from a bitmap onto the destination.
- Parameters:
- Signatures by Language:
- C/C++: void draw_cell_onto_xy(bitmap dest, bitmap src, int32_t cell, float x, float y);
- C++: void draw_cell(bitmap dest, bitmap src, int32_t cell, float x, float y);
- Pascal: procedure DrawCell(dest: Bitmap; src: Bitmap; cell: Longint; x: Single; y: Single);
- source code
- lib name: DrawCellOntoXY
Draw Cell On Screen
Draw a cell from a bitmap onto the game.
- Draw Cell On Screen (src, cell, const position) [show]
Draw a cell from a bitmap onto the game.
- Parameters:
- Signatures by Language:
- C/C++: void draw_cell_on_screen(bitmap src, int32_t cell, const point2d *position);
- C/C++: void draw_cell_on_screen_byval(bitmap src, int32_t cell, const point2d position);
- C++: void draw_cell_on_screen(bitmap src, int32_t cell, const point2d &position);
- Pascal: procedure DrawCellOnScreen(src: Bitmap; cell: Longint; const position: Point2D);
- Draw Cell On Screen (src, cell, x, y) [show]
Draw a cell from a bitmap onto the screen.
- Parameters:
-
- src : Bitmap
- cell : Longint
- x : Single
- y : Single
- Signatures by Language:
- C/C++: void draw_cell_on_screen_xy(bitmap src, int32_t cell, float x, float y);
- C++: void draw_cell_on_screen(bitmap src, int32_t cell, float x, float y);
- Pascal: procedure DrawCellOnScreen(src: Bitmap; cell: Longint; x: Single; y: Single);
- source code
- lib name: DrawCellOnScreenXY
Free Bitmap
Frees a loaded bitmap. Use this when you will no longer be drawing the bitmap (including within Sprites), and when the program exits.
- Free Bitmap (var bitmapToFree) [show]
Frees a loaded bitmap. Use this when you will no longer be drawing the bitmap (including within Sprites), and when the program exits.
- Parameters:
-
- bitmapToFree : Bitmap
- Signatures by Language:
- C/C++: void free_bitmap(bitmap *bitmapToFree);
- C++: void free_bitmap(bitmap &bitmapToFree);
- Pascal: procedure FreeBitmap(var bitmapToFree: Bitmap);
Has Bitmap
Determines if SwinGame has a bitmap loaded for the supplied name. This checks against all bitmaps loaded, those loaded without a name are assigned the filename as a default.
- Has Bitmap (name) : Boolean [show]
Determines if SwinGame has a bitmap loaded for the supplied name. This checks against all bitmaps loaded, those loaded without a name are assigned the filename as a default.
- Parameters:
-
- name : String
- Returns:
- Boolean :
- Signatures by Language:
- C/C++: bool has_bitmap(const char *name);
- Pascal: function HasBitmap(name: String): Boolean;
Load Bitmap
Loads a bitmap from file into a Bitmap variable. This can then be drawn to the screen. Bitmaps can be of bmp, jpeg, gif, png, etc. Images may also contain alpha values, which will be drawn correctly by the API. All bitmaps must be freed using the FreeBitmap once you are finished with them.
- Load Bitmap (filename) : Bitmap [show]
Loads a bitmap from file into a Bitmap variable. This can then be drawn to the screen. Bitmaps can be of bmp, jpeg, gif, png, etc. Images may also contain alpha values, which will be drawn correctly by the API. All bitmaps must be freed using the FreeBitmap once you are finished with them.
- Parameters:
-
- filename : String
- Returns:
- Bitmap :
- Signatures by Language:
- C/C++: bitmap load_bitmap(const char *filename);
- Pascal: function LoadBitmap(filename: String): Bitmap;
- Load Bitmap (filename, transparent, transparentColor) : Bitmap [show]
Loads a bitmap from file using where the specified transparent color is used as a color key for the transparent color.
- Parameters:
-
- filename : String
- transparent : Boolean
- transparentColor : Color
- Returns:
- Bitmap :
- Signatures by Language:
- C/C++: bitmap load_bitmap_with_transparent_color(const char *filename, bool transparent, color transparentColor);
- C++: bitmap load_bitmap(const char *filename, bool transparent, color transparentColor);
- Pascal: function LoadBitmap(filename: String; transparent: Boolean; transparentColor: Color): Bitmap;
- source code
- lib name: LoadBitmapWithTransparentColor
Load Bitmap Named
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 SwinGame. The Bitmap can then be retrieved by passing this name to the BitmapNamed function.
- Load Bitmap Named (name, filename) : Bitmap [show]
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 SwinGame. The Bitmap can then be retrieved by passing this name to the BitmapNamed function.
- Parameters:
-
- name : String
- filename : String
- Returns:
- Bitmap :
- Signatures by Language:
- C/C++: bitmap load_bitmap_named(const char *name, const char *filename);
- Pascal: function LoadBitmapNamed(name: String; filename: String): Bitmap;
Load Transparent Bitmap
Loads a bitmap with a transparent color key. The transparent color is then setup as the color key to ensure the image is drawn correctly. Alpha values of Images loaded in this way will be ignored. All bitmaps must be freed using the FreeBitmap once you are finished with them.
- Load Transparent Bitmap (filename, transparentColor) : Bitmap [show]
Loads a bitmap with a transparent color key. The transparent color is then setup as the color key to ensure the image is drawn correctly. Alpha values of Images loaded in this way will be ignored. All bitmaps must be freed using the FreeBitmap once you are finished with them.
Load Transparent Bitmap Named
Loads and returns a bitmap with a given color code use for transparency. The supplied filename is used to locate the Bitmap to load. The supplied name indicates thename to use to refer to this Bitmap in SwinGame. The Bitmap can then be retrieved by passing this name to the BitmapNamed function.
- Load Transparent Bitmap Named (name, filename, transparentColor) : Bitmap [show]
Loads and returns a bitmap with a given color code use for transparency. The supplied filename is used to locate the Bitmap to load. The supplied name indicates thename to use to refer to this Bitmap in SwinGame. The Bitmap can then be retrieved by passing this name to the BitmapNamed function.
- Parameters:
-
- name : String
- filename : String
- transparentColor : Color
- Returns:
- Bitmap :
- Signatures by Language:
- C/C++: bitmap load_transparent_bitmap_named(const char *name, const char *filename, color transparentColor);
- Pascal: function LoadTransparentBitmapNamed(name: String; filename: String; transparentColor: Color): Bitmap;
Make Opaque
Removes any surface level transparency from the supplied bitmap.
Make Transparent
Turns on the surface level transparency for the supplied bitmap, the transparency value is then set to 0 (fully transparent).
Optimise Bitmap
Created bitmaps can be optimised for faster drawing to the screen. This optimisation should be called only once after all drawing to the bitmap is complete. Optimisation should not be used if the bitmap is to be drawn onto in the future. All loaded bitmaps are optimised during loading.
- Optimise Bitmap (surface) [show]
Created bitmaps can be optimised for faster drawing to the screen. This optimisation should be called only once after all drawing to the bitmap is complete. Optimisation should not be used if the bitmap is to be drawn onto in the future. All loaded bitmaps are optimised during loading.
- Parameters:
-
- surface : Bitmap
- Signatures by Language:
- C/C++: void optimise_bitmap(bitmap surface);
- Pascal: procedure OptimiseBitmap(surface: Bitmap);
Pixel Drawn At Point
Checks if a pixel is drawn at the specified x,y location.
- Pixel Drawn At Point (bmp, x, y) : Boolean [show]
Checks if a pixel is drawn at the specified x,y location.
- Parameters:
-
- bmp : Bitmap
- x : Longint
- y : Longint
- Returns:
- Boolean :
- Signatures by Language:
- C/C++: bool pixel_drawn_at_point(bitmap bmp, int32_t x, int32_t y);
- Pascal: function PixelDrawnAtPoint(bmp: Bitmap; x: Longint; y: Longint): Boolean;
Release All Bitmaps
Releases all of the bitmaps that have been loaded.
- Release All Bitmaps () [show]
Releases all of the bitmaps that have been loaded.
Release Bitmap
Releases the SwinGame resources associated with the bitmap of the specified name.
- Release Bitmap (name) [show]
Releases the SwinGame resources associated with the bitmap of the specified name.
- Parameters:
-
- name : String
- Signatures by Language:
- C/C++: void release_bitmap(const char *name);
- Pascal: procedure ReleaseBitmap(name: String);
Rotate Scale Bitmap
Rotate and Scale the passed in bitmap.
Same Bitmap Cell
Returns true of the two bitmap cells refer to the same cell in the one bitmap.
- Same Bitmap Cell (const bmp1, const bmp2) : Boolean [show]
Returns true of the two bitmap cells refer to the same cell in the one bitmap.
- Parameters:
-
- bmp1 : BitmapCell
- bmp2 : BitmapCell
- Returns:
- Boolean :
- Signatures by Language:
- C/C++: bool same_bitmap_cell(const bitmap_cell *bmp1, const bitmap_cell *bmp2);
- C/C++: bool same_bitmap_cell_byval(const bitmap_cell bmp1, const bitmap_cell bmp2);
- C++: bool same_bitmap_cell(const bitmap_cell &bmp1, const bitmap_cell &bmp2);
- Pascal: function SameBitmapCell(const bmp1: BitmapCell; const bmp2: BitmapCell): Boolean;
Save Bitmap
Save Bitmap to specific directory.
Save To PNG
Saves the bitmap to a png file at the specified location.
Set Opacity
Turns on the surface level transparency for the supplied bitmap, and set the transparency value to the percentage supplied in pct.
- Set Opacity (bmp, pct) [show]
Turns on the surface level transparency for the supplied bitmap, and set the transparency value to the percentage supplied in pct.
- Parameters:
-
- bmp : Bitmap
- pct : Single
- Signatures by Language:
- C/C++: void set_opacity(bitmap bmp, float pct);
- Pascal: procedure SetOpacity(bmp: Bitmap; pct: Single);
Set Transparent Color
Setting the color passed in to be transparent on the bitmap. This edits the passed in bitmap, altering the color to transparent.
- Set Transparent Color (src, clr) [show]
Setting the color passed in to be transparent on the bitmap. This edits the passed in bitmap, altering the color to transparent.
Setup Bitmap For Collisions
Setup the passed in bitmap for pixel level collisions.