22 #ifndef GRAPHICS_TINYGL_ZBLIT_PUBLIC_H 23 #define GRAPHICS_TINYGL_ZBLIT_PUBLIC_H 25 #include "common/rect.h" 27 #include "graphics/surface.h" 32 BlitTransform(
int dstX,
int dstY) : _rotation(0), _originX(0), _originY(0), _aTint(1.0f),
33 _rTint(1.0f), _gTint(1.0f), _bTint(1.0), _flipHorizontally(
false),
34 _flipVertically(
false) {
35 _destinationRectangle.
translate(dstX, dstY);
38 void sourceRectangle(
int srcX,
int srcY,
int srcWidth,
int srcHeight) {
39 _sourceRectangle.
left = srcX;
40 _sourceRectangle.top = srcY;
45 void tint(
float aTint,
float rTint = 1.0f,
float gTint = 1.0f,
float bTint = 1.0f) {
57 void rotate(
int rotation,
int originX,
int originY) {
63 void flip(
bool verticalFlip,
bool horizontalFlip) {
64 _flipVertically = verticalFlip;
65 _flipHorizontally = horizontalFlip;
70 _sourceRectangle == other._sourceRectangle && _destinationRectangle == other._destinationRectangle &&
71 _rotation == other._rotation && _originX == other._originX && _originY == other._originY &&
72 _aTint == other._aTint && _rTint == other._rTint && _gTint == other._gTint && _bTint == other._bTint &&
73 _flipHorizontally == other._flipHorizontally && _flipVertically == other._flipVertically;
79 int _originX, _originY;
80 float _aTint, _rTint, _gTint, _bTint;
81 bool _flipHorizontally, _flipVertically;
92 TinyGL::BlitImage *tglGenBlitImage();
101 void tglUploadBlitImage(TinyGL::BlitImage *blitImage,
const Graphics::Surface &surface, uint32 colorKey,
bool applyColorKey,
bool zBuffer =
false);
107 void tglDeleteBlitImage(TinyGL::BlitImage *blitImage);
115 void tglGetBlitImageSize(TinyGL::BlitImage *blitImage,
int &width,
int &height);
122 int tglGetBlitImageVersion(TinyGL::BlitImage *blitImage);
137 void tglBlit(TinyGL::BlitImage *blitImage,
int x,
int y);
145 void tglBlitFast(TinyGL::BlitImage *blitImage,
int x,
int y);
153 void tglBlitZBuffer(TinyGL::BlitImage *blitImage,
int x,
int y);
155 void tglIncBlitImageRef(TinyGL::BlitImage *blitImage);
157 #endif // GRAPHICS_TINYGL_ZBLIT_PUBLIC_H void setHeight(int16 aHeight)
Definition: rect.h:198
void translate(int16 dx, int16 dy)
Definition: rect.h:354
Definition: colormasks.h:27
void setWidth(int16 aWidth)
Definition: rect.h:194
int16 left
Definition: rect.h:145