28 #ifndef AGS_SHARED_GFX_BITMAP_H 29 #define AGS_SHARED_GFX_BITMAP_H 31 #include "ags/shared/gfx/gfx_def.h" 32 #include "ags/shared/util/geometry.h" 33 #include "ags/shared/util/string.h" 40 enum BitmapMaskOption {
51 #include "ags/shared/gfx/allegro_bitmap.h" 60 namespace BitmapHelper {
68 Bitmap *CreateBitmap(
int width,
int height,
int color_depth = 0);
70 Bitmap *CreateClearBitmap(
int width,
int height,
int color_depth = 0,
int clear_color = 0);
72 Bitmap *CreateTransparentBitmap(
int width,
int height,
int color_depth = 0);
76 Bitmap *CreateSubBitmap(Bitmap *src,
const Rect &rc);
79 Bitmap *CreateBitmapCopy(Bitmap *src,
int color_depth = 0);
82 Bitmap *LoadFromFile(
const char *filename);
83 inline Bitmap *LoadFromFile(
const String &filename) {
84 return LoadFromFile(filename.GetCStr());
86 Bitmap *LoadFromFile(PACKFILE *pf);
90 Bitmap *AdjustBitmapSize(Bitmap *src,
int width,
int height);
92 void MakeOpaque(Bitmap *bmp);
95 void MakeOpaqueSkipMask(Bitmap *bmp);
97 void ReplaceAlphaWithRGBMask(Bitmap *bmp);
102 void CopyTransparency(Bitmap *dst,
const Bitmap *mask,
bool dst_has_alpha,
bool mask_has_alpha);
107 void ReadPixelsFromMemory(Bitmap *dst,
const uint8_t *src_buffer,
const size_t src_pitch,
const size_t src_px_offset = 0);
Definition: achievements_tables.h:27