62#include <mcp/syscalls.h>
70#define PARAM_DRAW_NE true
71#define PARAM_DRAW_SE true
72#define PARAM_DRAW_SW true
73#define PARAM_DRAW_NW true
74#define PARAM_SKIP_NE false
75#define PARAM_SKIP_SE false
76#define PARAM_SKIP_SW false
77#define PARAM_SKIP_NW false
79#define PARAM_DO_FILL true
80#define PARAM_DO_NOT_FILL false
82#define PARAM_IN_VRAM true
83#define PARAM_NOT_IN_VRAM false
135bool Bitmap_Destroy(
Bitmap** the_bitmap);
170bool Bitmap_Blit(
Bitmap* src_bm, int16_t src_x, int16_t src_y,
Bitmap* dst_bm, int16_t dst_x, int16_t dst_y, int16_t width, int16_t height);
230bool Bitmap_FillBox(
Bitmap* the_bitmap, int16_t x, int16_t y, int16_t width, int16_t height, uint8_t the_color);
319bool Bitmap_DrawLine(
Bitmap* the_bitmap, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint8_t the_color);
347bool Bitmap_DrawBox(
Bitmap* the_bitmap, int16_t x, int16_t y, int16_t width, int16_t height, uint8_t the_color,
bool do_fill);
356bool Bitmap_DrawRoundBox(
Bitmap* the_bitmap, int16_t x, int16_t y, int16_t width, int16_t height, int16_t radius, uint8_t the_color,
bool do_fill);
bool Bitmap_TileV2(Bitmap *src_bm, int16_t src_x, int16_t src_y, Bitmap *dst_bm, int16_t width, int16_t height)
Tile the source bitmap into the destination bitmap, filling it The source and destination bitmaps can...
Definition: bitmap.c:827
bool Bitmap_SetColor(Bitmap *the_bitmap, uint8_t the_color)
Set the "pen" color This is the color that the next pen-based graphics function will use This only af...
Definition: bitmap.c:1223
int16_t Bitmap_GetX(Bitmap *the_bitmap)
Get the current X position of the pen.
Definition: bitmap.c:1284
bool Bitmap_Tile(Bitmap *src_bm, int16_t src_x, int16_t src_y, Bitmap *dst_bm, int16_t width, int16_t height)
Tile the source bitmap into the destination bitmap, filling it The source and destination bitmaps can...
Definition: bitmap.c:706
bool Bitmap_DrawHLine(Bitmap *the_bitmap, int16_t x, int16_t y, int16_t the_line_len, uint8_t the_color)
Draws a horizontal line from specified coords, for n pixels, using the specified pixel value.
Definition: bitmap.c:1548
uint8_t Bitmap_GetColor(Bitmap *the_bitmap)
Get the current color of the pen.
Definition: bitmap.c:1269
bool Bitmap_FillBoxRect(Bitmap *the_bitmap, Rectangle *the_coords, uint8_t the_color)
Fill pixel values for the passed Rectangle object, using the specified LUT value.
Definition: bitmap.c:1126
bool Bitmap_Blit(Bitmap *src_bm, int16_t src_x, int16_t src_y, Bitmap *dst_bm, int16_t dst_x, int16_t dst_y, int16_t width, int16_t height)
Blit from source bitmap to distination bitmap.
Definition: bitmap.c:457
bool Bitmap_SetFont(Bitmap *the_bitmap, Font *the_font)
Set the font This is the font that will be used for all font drawing in this bitmap.
Definition: bitmap.c:1197
uint32_t Bitmap_GetMemLocInt(Bitmap *the_bitmap)
Calculate the VRAM location of the current coordinate within the bitmap.
Definition: bitmap.c:1405
bool Bitmap_Resize(Bitmap *the_bitmap, int16_t width, int16_t height)
Resize and existing bitmap by setting new width/height and allocating bigger storage if necessary NOT...
Definition: bitmap.c:371
bool Bitmap_DrawCircle(Bitmap *the_bitmap, int16_t x1, int16_t y1, int16_t radius, uint8_t the_color)
Draw a circle Based on http://rosettacode.org/wiki/Bitmap/Midpoint_circle_algorithm#C.
Definition: bitmap.c:1841
Font * Bitmap_GetFont(Bitmap *the_bitmap)
Get the current font of the pen.
Definition: bitmap.c:1313
bool Bitmap_FillBox(Bitmap *the_bitmap, int16_t x, int16_t y, int16_t width, int16_t height, uint8_t the_color)
Fill pixel values for a specific box area calling function must validate screen id,...
Definition: bitmap.c:1138
bool Bitmap_TileV1(Bitmap *src_bm, int16_t src_x, int16_t src_y, Bitmap *dst_bm, int16_t width, int16_t height)
Tile the source bitmap into the destination bitmap, filling it The source and destination bitmaps can...
Definition: bitmap.c:955
uint8_t Bitmap_GetPixelAtXY(Bitmap *the_bitmap, int16_t x, int16_t y)
Get the pixel CLUT index at a specified x, y coord.
Definition: bitmap.c:1455
Bitmap * Bitmap_New(int16_t width, int16_t height, Font *the_font, bool in_vram)
Create a new bitmap object by allocating space for the bitmap struct in regular memory,...
Definition: bitmap.c:253
bool Bitmap_SetPixelAtXY(Bitmap *the_bitmap, int16_t x, int16_t y, uint8_t the_color)
Set a char at a specified x, y coord.
Definition: bitmap.c:1421
bool Bitmap_DrawRoundBox(Bitmap *the_bitmap, int16_t x, int16_t y, int16_t width, int16_t height, int16_t radius, uint8_t the_color, bool do_fill)
Draws a rounded rectangle with the specified size and radius, and optionally fills the rectangle.
Definition: bitmap.c:1759
bool Bitmap_SetXY(Bitmap *the_bitmap, int16_t x, int16_t y)
Set the "pen" position This is the location that the next pen-based graphics function will use for a ...
Definition: bitmap.c:1245
bool Bitmap_DrawVLine(Bitmap *the_bitmap, int16_t x, int16_t y, int16_t the_line_len, uint8_t the_color)
Draws a vertical line from specified coords, for n pixels.
Definition: bitmap.c:1578
bool Bitmap_DrawBoxCoords(Bitmap *the_bitmap, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint8_t the_color)
Draws a rectangle based on 2 sets of coords, using the specified LUT value.
Definition: bitmap.c:1617
unsigned char * Bitmap_GetMemLoc(Bitmap *the_bitmap)
Calculate the VRAM location of the current coordinate within the bitmap.
Definition: bitmap.c:1393
bool Bitmap_BlitRect(Bitmap *src_bm, Rectangle *src_rect, Bitmap *dst_bm, int16_t dst_x, int16_t dst_y)
Blit a rect from source bitmap to distination bitmap This is a wrapper around Bitmap_Blit() The sourc...
Definition: bitmap.c:429
bool Bitmap_TileV3(Bitmap *src_bm, int16_t src_x, int16_t src_y, Bitmap *dst_bm, int16_t width, int16_t height)
Tile the source bitmap into the destination bitmap, filling it The source and destination bitmaps can...
Definition: bitmap.c:564
bool Bitmap_DrawBoxRect(Bitmap *the_bitmap, Rectangle *the_coords, uint8_t the_color)
Draws a rectangle based on the passed Rectangle object, using the specified LUT value.
Definition: bitmap.c:1608
bool Bitmap_FillMemory(Bitmap *the_bitmap, uint8_t the_color)
Definition: bitmap.c:1091
bool Bitmap_DrawLine(Bitmap *the_bitmap, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint8_t the_color)
Draws a line between 2 passed coordinates.
Definition: bitmap.c:1490
int16_t Bitmap_GetY(Bitmap *the_bitmap)
Get the current Y position of the pen.
Definition: bitmap.c:1298
bool Bitmap_DrawBox(Bitmap *the_bitmap, int16_t x, int16_t y, int16_t width, int16_t height, uint8_t the_color, bool do_fill)
Draws a rectangle based on start coords and width/height, and optionally fills the rectangle.
Definition: bitmap.c:1686
bool in_vram_
a way to know if this bitmap is pointing to VRAM or standard RAM space.
Definition: bitmap.h:107
uint32_t addr_int_
address of the start of the bitmap, as an unsigned long int. For use with plotting locations on 65816...
Definition: bitmap.h:106
int16_t width_
width of the bitmap in pixels
Definition: bitmap.h:98
uint8_t color_
color value to use for next "pen" based operation in this bitmap
Definition: bitmap.h:102
int16_t y_
V position within this bitmap, of the "pen", for functions that draw from that point.
Definition: bitmap.h:101
Font * font_
the currently selected font. All text drawing activities will use this font face.
Definition: bitmap.h:104
uint8_t reserved_
future use
Definition: bitmap.h:103
int16_t x_
H position within this bitmap, of the "pen", for functions that draw from that point.
Definition: bitmap.h:100
unsigned char * addr_
address of the start of the bitmap, within the machine's global address space. This is not the VICKY'...
Definition: bitmap.h:105
int16_t height_
height of the bitmap in pixels
Definition: bitmap.h:99
This Font object is essentially the Mac "fontRecord" struct, with added pointers for the data tables.
Definition: font.h:71
Definition: a2560k.h:1369