inline rgb_color
Color(int32 r, int32 g, int32 b, int32 alpha = 255)
{
- rgb_color result;
- result.red = r;
- result.green = g;
- result.blue = b;
- result.alpha = alpha;
+ rgb_color result;
+ result.red = r;
+ result.green = g;
+ result.blue = b;
+ result.alpha = alpha;
- return result;
+ return result;
}
const rgb_color kWhite = { 255, 255, 255, 255};
// and fromHeight must be smaller or equal to the bitmaps size!
// only supported colorspaces are B_RGB32 and B_RGBA32
status_t scale_bitmap( BBitmap* bitmap,
- uint32 fromWidth, uint32 fromHeight );
+ uint32 fromWidth, uint32 fromHeight );
// bitmaps need to be the same size, or this function will fail
// currently supported conversions:
-// B_YCbCr422 -> B_RGB32
-// B_RGB32 -> B_RGB32
-// B_RGB16 -> B_RGB32
+// B_YCbCr422 -> B_RGB32
+// B_RGB32 -> B_RGB32
+// B_RGB16 -> B_RGB32
// not yet implemented conversions:
-// B_YCbCr420 -> B_RGB32
-// B_YUV422 -> B_RGB32
+// B_YCbCr420 -> B_RGB32
+// B_YUV422 -> B_RGB32
status_t convert_bitmap(BBitmap* inBitmap, BBitmap* outBitmap);
// dims bitmap (in place) by finding the distance of
// B_RGBA32
// B_CMAP8
status_t dim_bitmap(BBitmap* bitmap, rgb_color center,
- float dimLevel);
+ float dimLevel);
rgb_color dimmed_color_cmap8(rgb_color color, rgb_color center,
- float dimLevel);
+ float dimLevel);
-#endif // __DRAWING_TIBITS__
+#endif // __DRAWING_TIBITS__