31#ifndef SWORD25_BITMAP_RESOURCE_H
32#define SWORD25_BITMAP_RESOURCE_H
34#include "sword25/kernel/common.h"
35#include "sword25/kernel/resource.h"
36#include "sword25/gfx/image/image.h"
43 _pImage(pImage),
Resource(filename, Resource::TYPE_BITMAP) {}
50 return (_pImage != 0);
105 bool blit(
int posX = 0,
int posY = 0,
108 uint color = BS_ARGB(255, 255, 255, 255),
109 int width = -1,
int height = -1,
112 return _pImage->
blit(posX, posY, flipping, pSrcPartRect, color, width, height, updateRects);
130 return _pImage->
fill(pFillRect, color);
191 return _pImage->isSolid();
Definition: bitmapresource.h:40
bool isAlphaAllowed()
Gibt true zurück, wenn das BS_Image bei einem Aufruf von Blit() mit einem Alphawert dargestellt werde...
Definition: bitmapresource.h:176
bool isValid() const
Gibt zurück, ob das Objekt einen gültigen Zustand hat.
Definition: bitmapresource.h:49
bool isFillingAllowed()
Gibt true zurück, wenn das BS_Image mit einem Aufruf von Fill() gefüllt werden kann.
Definition: bitmapresource.h:168
bool isColorModulationAllowed()
Gibt true zurück, wenn das BS_Image bei einem Aufruf von Blit() mit Farbmodulation dargestellt werden...
Definition: bitmapresource.h:184
bool isBlitTarget()
Überprüft, ob das BS_Image ein Zielbild für einen Blit-Aufruf sein kann.
Definition: bitmapresource.h:152
uint getPixel(int x, int y) const
Liest einen Pixel des Bildes.
Definition: bitmapresource.h:141
int getWidth() const
Gibt die Breite des Bitmaps zurück.
Definition: bitmapresource.h:56
bool blit(int posX=0, int posY=0, int flipping=Graphics::FLIP_NONE, Common::Rect *pSrcPartRect=NULL, uint color=BS_ARGB(255, 255, 255, 255), int width=-1, int height=-1, RectangleList *updateRects=0)
Rendert das Bild in den Framebuffer.
Definition: bitmapresource.h:105
bool fill(const Common::Rect *pFillRect=0, uint color=BS_RGB(0, 0, 0))
Füllt einen Rechteckigen Bereich des Bildes mit einer Farbe.
Definition: bitmapresource.h:128
int getHeight() const
Gibt die Höhe des Bitmaps zurück.
Definition: bitmapresource.h:64
bool isScalingAllowed()
Gibt true zurück, falls das BS_Image bei einem Aufruf von Blit() skaliert dargestellt werden kann.
Definition: bitmapresource.h:160
virtual bool isAlphaAllowed() const =0
Returns true, if the BS_Image is allowed to be displayed with an alpha value.
virtual int getWidth() const =0
Returns the width of the image in pixels.
virtual uint getPixel(int x, int y)=0
Reads out a pixel of the image.
virtual bool blit(int posX=0, int posY=0, int flipping=Graphics::FLIP_NONE, Common::Rect *pPartRect=NULL, uint color=BS_ARGB(255, 255, 255, 255), int width=-1, int height=-1, RectangleList *updateRects=0)=0
renders the image in the framebuffer
virtual bool isBlitTarget() const =0
Checks, if the BS_Image can be a target image for a Blit call.
virtual bool isScalingAllowed() const =0
Returns true, if the BS_Image is allowed to be scaled by a Blit() call.
virtual int getHeight() const =0
Returns the height of the image in pixels.
virtual bool fill(const Common::Rect *pFillRect=0, uint color=BS_RGB(0, 0, 0))=0
fills a rectangular section of the image with a color.
virtual bool isFillingAllowed() const =0
Returns true, if the BS_Image is allowed to be filled by a Fill() call.
virtual bool isColorModulationAllowed() const =0
Return true, if the BS_Image is allowed to be displayed with color modulation by a Blit() call.
Definition: microtiles.h:38
Definition: resource.h:43
@ FLIP_NONE
The image will not be flipped.
Definition: transform_struct.h:49