summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--amiga/bitmap.c21
-rw-r--r--beos/beos_bitmap.cpp34
-rw-r--r--gtk/gtk_bitmap.c22
-rw-r--r--riscos/bitmap.c2
4 files changed, 41 insertions, 38 deletions
diff --git a/amiga/bitmap.c b/amiga/bitmap.c
index e28000aa4..47c3ca9fe 100644
--- a/amiga/bitmap.c
+++ b/amiga/bitmap.c
@@ -208,14 +208,17 @@ int bitmap_get_height(void *bitmap)
}
}
-size_t bitmap_get_bpp(void *bitmap)
+
+/**
+ * Find the bytes per pixel of a bitmap
+ *
+ * \param vbitmap a bitmap, as returned by bitmap_create()
+ * \return bytes per pixel
+ */
+
+size_t bitmap_get_bpp(void *vbitmap)
{
- if(bitmap)
- {
- return 32;
- }
- else
- {
- return 0;
- }
+ struct bitmap *bitmap = (struct bitmap *)vbitmap;
+ assert(bitmap);
+ return 4;
}
diff --git a/beos/beos_bitmap.cpp b/beos/beos_bitmap.cpp
index 778a2eb68..06e686c0e 100644
--- a/beos/beos_bitmap.cpp
+++ b/beos/beos_bitmap.cpp
@@ -151,8 +151,8 @@ void *bitmap_create(int width, int height, unsigned int state)
/**
* Sets whether a bitmap should be plotted opaque
*
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \param opaque whether the bitmap should be plotted opaque
+ * \param vbitmap a bitmap, as returned by bitmap_create()
+ * \param opaque whether the bitmap should be plotted opaque
*/
void bitmap_set_opaque(void *vbitmap, bool opaque)
{
@@ -166,8 +166,8 @@ void bitmap_set_opaque(void *vbitmap, bool opaque)
/**
* Tests whether a bitmap has an opaque alpha channel
*
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \return whether the bitmap is opaque
+ * \param vbitmap a bitmap, as returned by bitmap_create()
+ * \return whether the bitmap is opaque
*/
bool bitmap_test_opaque(void *vbitmap)
{
@@ -181,7 +181,7 @@ bool bitmap_test_opaque(void *vbitmap)
/**
* Gets whether a bitmap should be plotted opaque
*
- * \param bitmap a bitmap, as returned by bitmap_create()
+ * \param vbitmap a bitmap, as returned by bitmap_create()
*/
bool bitmap_get_opaque(void *vbitmap)
{
@@ -195,7 +195,7 @@ bool bitmap_get_opaque(void *vbitmap)
/**
* Return a pointer to the pixel data in a bitmap.
*
- * \param bitmap a bitmap, as returned by bitmap_create()
+ * \param vbitmap a bitmap, as returned by bitmap_create()
* \return pointer to the pixel buffer
*
* The pixel data is packed as BITMAP_FORMAT, possibly with padding at the end
@@ -213,7 +213,7 @@ unsigned char *bitmap_get_buffer(void *vbitmap)
/**
* Find the width of a pixel row in bytes.
*
- * \param bitmap a bitmap, as returned by bitmap_create()
+ * \param vbitmap a bitmap, as returned by bitmap_create()
* \return width of a pixel row in the bitmap
*/
@@ -228,7 +228,7 @@ size_t bitmap_get_rowstride(void *vbitmap)
/**
* Find the bytes per pixels of a bitmap.
*
- * \param bitmap a bitmap, as returned by bitmap_create()
+ * \param vbitmap a bitmap, as returned by bitmap_create()
* \return bytes per pixels of the bitmap
*/
@@ -253,7 +253,7 @@ nsbeos_bitmap_free_pretiles(struct bitmap *bitmap)
/**
* Free a bitmap.
*
- * \param bitmap a bitmap, as returned by bitmap_create()
+ * \param vbitmap a bitmap, as returned by bitmap_create()
*/
void bitmap_destroy(void *vbitmap)
@@ -270,9 +270,9 @@ void bitmap_destroy(void *vbitmap)
/**
* Save a bitmap in the platform's native format.
*
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \param path pathname for file
- * \param flags modify the behaviour of the save
+ * \param vbitmap a bitmap, as returned by bitmap_create()
+ * \param path pathname for file
+ * \param flags modify the behaviour of the save
* \return true on success, false on error and error reported
*/
@@ -297,14 +297,14 @@ bool bitmap_save(void *vbitmap, const char *path, unsigned flags)
/**
* The bitmap image has changed, so flush any persistant cache.
*
- * \param bitmap a bitmap, as returned by bitmap_create()
+ * \param vbitmap a bitmap, as returned by bitmap_create()
*/
void bitmap_modified(void *vbitmap) {
struct bitmap *bitmap = (struct bitmap *)vbitmap;
// convert the shadow (ABGR) to into the primary bitmap
- nsbeos_rgba_to_bgra(bitmap->shadow->Bits(), bitmap->primary->Bits(),
- bitmap->primary->Bounds().Width() + 1,
- bitmap->primary->Bounds().Height() + 1,
+ nsbeos_rgba_to_bgra(bitmap->shadow->Bits(), bitmap->primary->Bits(),
+ bitmap->primary->Bounds().Width() + 1,
+ bitmap->primary->Bounds().Height() + 1,
bitmap->primary->BytesPerRow());
nsbeos_bitmap_free_pretiles(bitmap);
}
@@ -313,7 +313,7 @@ void bitmap_modified(void *vbitmap) {
/**
* The bitmap image can be suspended.
*
- * \param bitmap a bitmap, as returned by bitmap_create()
+ * \param vbitmap a bitmap, as returned by bitmap_create()
* \param private_word a private word to be returned later
* \param suspend the function to be called upon suspension
* \param resume the function to be called when resuming
diff --git a/gtk/gtk_bitmap.c b/gtk/gtk_bitmap.c
index e08741260..0fc0414e9 100644
--- a/gtk/gtk_bitmap.c
+++ b/gtk/gtk_bitmap.c
@@ -73,8 +73,8 @@ void *bitmap_create(int width, int height, unsigned int state)
/**
* Sets whether a bitmap should be plotted opaque
*
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \param opaque whether the bitmap should be plotted opaque
+ * \param vbitmap a bitmap, as returned by bitmap_create()
+ * \param opaque whether the bitmap should be plotted opaque
*/
void bitmap_set_opaque(void *vbitmap, bool opaque)
{
@@ -87,7 +87,7 @@ void bitmap_set_opaque(void *vbitmap, bool opaque)
/**
* Tests whether a bitmap has an opaque alpha channel
*
- * \param bitmap a bitmap, as returned by bitmap_create()
+ * \param vbitmap a bitmap, as returned by bitmap_create()
* \return whether the bitmap is opaque
*/
bool bitmap_test_opaque(void *vbitmap)
@@ -102,7 +102,7 @@ bool bitmap_test_opaque(void *vbitmap)
/**
* Gets whether a bitmap should be plotted opaque
*
- * \param bitmap a bitmap, as returned by bitmap_create()
+ * \param vbitmap a bitmap, as returned by bitmap_create()
*/
bool bitmap_get_opaque(void *vbitmap)
{
@@ -116,7 +116,7 @@ bool bitmap_get_opaque(void *vbitmap)
/**
* Return a pointer to the pixel data in a bitmap.
*
- * \param bitmap a bitmap, as returned by bitmap_create()
+ * \param vbitmap a bitmap, as returned by bitmap_create()
* \return pointer to the pixel buffer
*
* The pixel data is packed as BITMAP_FORMAT, possibly with padding at the end
@@ -134,7 +134,7 @@ unsigned char *bitmap_get_buffer(void *vbitmap)
/**
* Find the width of a pixel row in bytes.
*
- * \param bitmap a bitmap, as returned by bitmap_create()
+ * \param vbitmap a bitmap, as returned by bitmap_create()
* \return width of a pixel row in the bitmap
*/
@@ -149,7 +149,7 @@ size_t bitmap_get_rowstride(void *vbitmap)
/**
* Find the bytes per pixel of a bitmap
*
- * \param bitmap a bitmap, as returned by bitmap_create()
+ * \param vbitmap a bitmap, as returned by bitmap_create()
* \return bytes per pixel
*/
@@ -174,7 +174,7 @@ gtk_bitmap_free_pretiles(struct bitmap *bitmap)
/**
* Free a bitmap.
*
- * \param bitmap a bitmap, as returned by bitmap_create()
+ * \param vbitmap a bitmap, as returned by bitmap_create()
*/
void bitmap_destroy(void *vbitmap)
@@ -190,9 +190,9 @@ void bitmap_destroy(void *vbitmap)
/**
* Save a bitmap in the platform's native format.
*
- * \param bitmap a bitmap, as returned by bitmap_create()
- * \param path pathname for file
- * \param flags modify the behaviour of the save
+ * \param vbitmap a bitmap, as returned by bitmap_create()
+ * \param path pathname for file
+ * \param flags modify the behaviour of the save
* \return true on success, false on error and error reported
*/
diff --git a/riscos/bitmap.c b/riscos/bitmap.c
index dd1271f2e..902157128 100644
--- a/riscos/bitmap.c
+++ b/riscos/bitmap.c
@@ -1179,7 +1179,7 @@ int bitmap_get_height(void *vbitmap)
/**
* Find the bytes per pixel of a bitmap
*
- * \param bitmap a bitmap, as returned by bitmap_create()
+ * \param vbitmap a bitmap, as returned by bitmap_create()
* \return bytes per pixel
*/