New function to create a bitmap slice.

git-svn-id: svn://svn.cc65.org/cc65/trunk@5557 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2012-02-26 21:45:42 +00:00
parent 4abdecc728
commit 7a3e6abb13
4 changed files with 69 additions and 1 deletions

View File

@@ -113,6 +113,14 @@ void FreeBitmap (Bitmap* B);
int ValidBitmapSize (unsigned Width, unsigned Height);
/* Return true if this is a valid size for a bitmap */
Bitmap* SliceBitmap (const Bitmap* Original,
unsigned X, unsigned Y,
unsigned Width, unsigned Height);
/* Create a slice of the given bitmap. The slice starts at position X/Y of
* the original and has the given width and height. Location 0/0 is at the
* upper left corner.
*/
Color GetPixelColor (const Bitmap* B, unsigned X, unsigned Y);
/* Get the color for a given pixel. For indexed bitmaps, the palette entry
* is returned.