diff options
Diffstat (limited to 'o3d/core/cross/bitmap.h')
-rw-r--r-- | o3d/core/cross/bitmap.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/o3d/core/cross/bitmap.h b/o3d/core/cross/bitmap.h index 2188fc9c..4710cb6 100644 --- a/o3d/core/cross/bitmap.h +++ b/o3d/core/cross/bitmap.h @@ -149,6 +149,11 @@ class Bitmap : public ParamObject { // level: mip level to get.
uint8 *GetMipData(unsigned int level) const;
+ // Gets the address of a particular pixel.
+ // Parameters:
+ // level: mip level to get.
+ uint8 *GetPixelData(unsigned int level, unsigned int x, unsigned int y) const;
+
// Gets the size of mip.
size_t GetMipSize(unsigned int level) const;
@@ -208,16 +213,20 @@ class Bitmap : public ParamObject { // and dest do not match.
// Parameters:
// source_img: source bitmap which would be drawn.
+ // source_level: level to draw.
// source_x: x-coordinate of the starting pixel in the source image.
// source_x: y-coordinate of the starting pixel in the source image.
// source_width: width of the source image to draw.
// source_height: Height of the source image to draw.
+ // dest_level: level to target.
// dest_x: x-coordinate of the starting pixel in the dest image.
// dest_y: y-coordinate of the starting pixel in the dest image.
// dest_width: width of the dest image to draw.
// dest_height: height of the dest image to draw.
- void DrawImage(const Bitmap& source_img, int source_x, int source_y,
+ void DrawImage(const Bitmap& source_img, int source_level,
+ int source_x, int source_y,
int source_width, int source_height,
+ int dest_level,
int dest_x, int dest_y,
int dest_width, int dest_height);
@@ -296,6 +305,9 @@ class Bitmap : public ParamObject { return GetMipChainSize(image::ComputeMipMapCount(width_, height_));
}
+ static size_t ComputeMaxSize(
+ unsigned width, unsigned height, Texture::Format format);
+
// pointer to the raw bitmap data
// NOTE: image_data_ is either NULL or it has space for the maximum number
// of mips for the current size bitmap, even if they are not used.
|