31#ifndef SWORD25_RENDERED_IMAGE_H
32#define SWORD25_RENDERED_IMAGE_H
38#include "sword25/kernel/common.h"
39#include "sword25/gfx/image/image.h"
40#include "sword25/gfx/graphicengine.h"
41#include "graphics/managed_surface.h"
72 void copyDirectly(
int posX,
int posY);
74 bool blit(
int posX = 0,
int posY = 0,
77 uint color = BS_ARGB(255, 255, 255, 255),
78 int width = -1,
int height = -1,
81 bool setContent(
const byte *pixeldata, uint size, uint offset = 0, uint stride = 0)
override;
82 void replaceContent(
byte *pixeldata,
int width,
int height);
107 void setAlphaType(Graphics::AlphaType alphaType) { _alphaType = alphaType; }
108 bool isSolid()
const override {
return _alphaType == Graphics::ALPHA_OPAQUE; }
112 Graphics::AlphaType _alphaType;
Definition: managed_surface.h:51
int16 & w
Definition: managed_surface.h:134
int16 & h
Definition: managed_surface.h:135
Definition: microtiles.h:38
Definition: renderedimage.h:45
bool isBlitSource() const override
Checks, if it is allowed to call BS_Image Blit().
Definition: renderedimage.h:85
bool isAlphaAllowed() const override
Returns true, if the BS_Image is allowed to be displayed with an alpha value.
Definition: renderedimage.h:97
int getWidth() const override
Returns the width of the image in pixels.
Definition: renderedimage.h:65
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) override
renders the image in the framebuffer
bool isColorModulationAllowed() const override
Return true, if the BS_Image is allowed to be displayed with color modulation by a Blit() call.
Definition: renderedimage.h:100
bool isSetContentAllowed() const override
Returns true, if the content of the BS_Image is allowed to be replaced by call of SetContent().
Definition: renderedimage.h:103
bool isBlitTarget() const override
Checks, if the BS_Image can be a target image for a Blit call.
Definition: renderedimage.h:88
bool isScalingAllowed() const override
Returns true, if the BS_Image is allowed to be scaled by a Blit() call.
Definition: renderedimage.h:91
RenderedImage(uint width, uint height, bool &result)
Creates an empty BS_RenderedImage.
bool isFillingAllowed() const override
Returns true, if the BS_Image is allowed to be filled by a Fill() call.
Definition: renderedimage.h:94
bool setContent(const byte *pixeldata, uint size, uint offset=0, uint stride=0) override
Fills the content of the image with pixel data.
int getHeight() const override
Returns the height of the image in pixels.
Definition: renderedimage.h:68
uint getPixel(int x, int y) override
Reads out a pixel of the image.
bool fill(const Common::Rect *pFillRect, uint color) override
fills a rectangular section of the image with a color.
@ FLIP_NONE
The image will not be flipped.
Definition: transform_struct.h:49