Initial community commit
This commit is contained in:
parent
537bcbc862
commit
fc06254474
16440 changed files with 4239995 additions and 2 deletions
48
Src/tataki/bitmap/mac/osx_bitmap_cgimage.h
Normal file
48
Src/tataki/bitmap/mac/osx_bitmap_cgimage.h
Normal file
|
@ -0,0 +1,48 @@
|
|||
#ifndef NULLSOFT_WASABI_OSX_BITMAP_CGIMAGE_H
|
||||
#define NULLSOFT_WASABI_OSX_BITMAP_CGIMAGE_H
|
||||
|
||||
#include <tataki/export.h>
|
||||
#include <bfc/platform/platform.h>
|
||||
#include <tataki/canvas/api_canvas.h>
|
||||
#include <api/wnd/ifc_bitmap.h>
|
||||
|
||||
/*
|
||||
TODO:
|
||||
need some kind of updateBits() so that the underlying image can be updated to reflect changes
|
||||
*/
|
||||
class TATAKIAPI SkinBitmap : public ifc_bitmap
|
||||
{
|
||||
public:
|
||||
SkinBitmap(ARGB32 *bits, int w, int h); // added by benski, use if you have raw image bits
|
||||
SkinBitmap(const wchar_t *elementname, int cached = 1);
|
||||
~SkinBitmap();
|
||||
int getWidth();
|
||||
int getHeight();
|
||||
int getFullWidth(); // aka pitch
|
||||
|
||||
// blits
|
||||
void blit(api_canvas *canvas, int x, int y);
|
||||
void blitAlpha(api_canvas *canvas, int x, int y, int alpha = 255);
|
||||
// stretch blits
|
||||
void stretchToRect(api_canvas *canvas, RECT *r);
|
||||
void stretchToRectAlpha(api_canvas *canvas, RECT *r, int alpha = 255);
|
||||
void stretchToRectAlpha(api_canvas *canvas, RECT *src, RECT *dst, int alpha = 255);
|
||||
// tiled blits
|
||||
void blitTile(api_canvas *canvas, RECT *dest, int xoffs = 0, int yoffs = 0, int alpha = 255);
|
||||
|
||||
ARGB32 getPixel(int x, int y);
|
||||
public: // ifc_bitmap implementations
|
||||
OSBITMAPHANDLE GetBitmap() { return image; }
|
||||
uint8_t *getBits();
|
||||
void UpdateBits(uint8_t *bits);
|
||||
|
||||
private:
|
||||
CGImageRef image;
|
||||
CGContextRef imageContext;
|
||||
void *bits;
|
||||
|
||||
protected:
|
||||
RECVS_DISPATCH;
|
||||
};
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue