ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

A derived graphics surface, which handles automatically managing the allocated surface data block, as well as introducing several new blitting methods. More...

#include <managed_surface.h>

Inheritance diagram for Graphics::ManagedSurface:
Collaboration diagram for Graphics::ManagedSurface:

List of all members.

Public Member Functions

bool clip (Common::Rect &srcBounds, Common::Rect &destBounds)
 Clips the given source bounds so the passed destBounds will be entirely on-screen.
 ManagedSurface ()
 Create the managed surface.
 ManagedSurface (const ManagedSurface &surf)
 Create a managed surface from another one.
 ManagedSurface (int width, int height)
 Create the managed surface.
 ManagedSurface (int width, int height, const Graphics::PixelFormat &pixelFormat)
 Create the managed surface.
 ManagedSurface (ManagedSurface &surf, const Common::Rect &bounds)
 Create the managed surface.
virtual ~ManagedSurface ()
 Destroy the managed surface.
 operator const Surface & () const
 Implements automatic conversion to a Graphics::Surface by simply returning the inner surface.
const SurfacerawSurface () const
ManagedSurfaceoperator= (const ManagedSurface &surf)
 Reassign one managed surface to another one Note that if the source has a managed surface, it will be duplicated.
bool empty () const
 Returns true if the surface has not yet been allocated.
DisposeAfterUse::Flag disposeAfterUse () const
 Returns true if the surface is managing its own pixels.
const void * getBasePtr (int x, int y) const
 Return a pointer to the pixel at the specified point.
void * getBasePtr (int x, int y)
 Return a pointer to the pixel at the specified point.
void * getPixels ()
 Get a reference to the pixel data.
const void * getPixels () const
virtual void setPixels (void *newPixels)
 Sets the pixel data.
virtual void create (uint16 width, uint16 height)
 Allocate memory for the pixel data of the surface.
virtual void create (uint16 width, uint16 height, const PixelFormat &pixelFormat)
 Allocate memory for the pixel data of the surface.
virtual void create (ManagedSurface &surf, const Common::Rect &bounds)
 Sets up the surface as a sub-section of another passed parent surface.
virtual void free ()
 Release the memory used by the pixels memory of this surface.
virtual void clearDirtyRects ()
 Clears any pending dirty rects that have been generated for the surface.
const Common::Point getOffsetFromOwner () const
 When the managed surface is a sub-section of a parent surface, returns the the offset in the parent surface that the surface starts at.
const Common::Rect getBounds () const
 Return a rect giving the bounds of the surface.
void blitFrom (const Surface &src)
 Copies another surface into this one.
void blitFrom (const Surface &src, const Common::Point &destPos)
 Copies another surface into this one at a given destination position.
void blitFrom (const Surface &src, const Common::Rect &srcRect, const Common::Point &destPos)
 Copies another surface into this one at a given destination position.
void blitFrom (const ManagedSurface &src)
 Copies another surface into this one.
void blitFrom (const ManagedSurface &src, const Common::Point &destPos)
 Copies another surface into this one at a given destination position.
void blitFrom (const ManagedSurface &src, const Common::Rect &srcRect, const Common::Point &destPos)
 Copies another surface into this one at a given destination position.
void transBlitFrom (const Surface &src, uint transColor=0, bool flipped=false, uint overrideColor=0, uint srcAlpha=0xff)
 Copies another surface into this one ignoring pixels of a designated transparent color.
void transBlitFrom (const Surface &src, const Common::Point &destPos, uint transColor=0, bool flipped=false, uint overrideColor=0, uint srcAlpha=0xff)
 Copies another surface into this one ignoring pixels of a designated transparent color.
void transBlitFrom (const Surface &src, const Common::Point &destPos, const ManagedSurface &mask)
 Copies another surface into this one ignoring pixels of a designated transparent color.
void transBlitFrom (const Surface &src, const Common::Point &destPos, const Surface &mask)
 Copies another surface into this one ignoring pixels of a designated transparent color.
void transBlitFrom (const Surface &src, const Common::Rect &srcRect, const Common::Point &destPos, uint transColor=0, bool flipped=false, uint overrideColor=0, uint srcAlpha=0xff)
 Copies another surface into this one ignoring pixels of a designated transparent color.
void transBlitFrom (const Surface &src, const Common::Rect &srcRect, const Common::Rect &destRect, uint transColor=0, bool flipped=false, uint overrideColor=0, uint srcAlpha=0xff, const Surface *mask=nullptr, bool maskOnly=false)
 Copies another surface into this one ignoring pixels of a designated transparent color.
void transBlitFrom (const ManagedSurface &src, uint transColor=0, bool flipped=false, uint overrideColor=0, uint srcAlpha=0xff)
 Copies another surface into this one ignoring pixels of a designated transparent color.
void transBlitFrom (const ManagedSurface &src, const Common::Point &destPos, uint transColor=0, bool flipped=false, uint overrideColor=0, uint srcAlpha=0xff)
 Copies another surface into this one ignoring pixels of a designated transparent color.
void transBlitFrom (const ManagedSurface &src, const Common::Point &destPos, const ManagedSurface &mask)
 Copies another surface into this one ignoring pixels of a designated transparent color.
void transBlitFrom (const ManagedSurface &src, const Common::Rect &srcRect, const Common::Point &destPos, uint transColor=0, bool flipped=false, uint overrideColor=0, uint srcAlpha=0xff)
 Copies another surface into this one ignoring pixels of a designated transparent color.
void transBlitFrom (const ManagedSurface &src, const Common::Rect &srcRect, const Common::Rect &destRect, uint transColor=0, bool flipped=false, uint overrideColor=0, uint srcAlpha=0xff, const Surface *mask=nullptr, bool maskOnly=false)
 Copies another surface into this one ignoring pixels of a designated transparent color.
void clear (uint color=0)
 Clear the entire surface.
void markAllDirty ()
 Mark the entire surface as dirty.
void copyRectToSurface (const void *buffer, int srcPitch, int destX, int destY, int width, int height)
 Copies a bitmap to the Surface internal buffer.
void copyRectToSurface (const Graphics::Surface &srcSurface, int destX, int destY, const Common::Rect subRect)
 Copies a bitmap to the Surface internal buffer.
void copyFrom (const ManagedSurface &surf)
 Copy the data from another Surface, reinitializing the surface to match the dimensions of the passed surface.
void drawLine (int x0, int y0, int x1, int y1, uint32 color)
 Draw a line.
void drawThickLine (int x0, int y0, int x1, int y1, int penX, int penY, uint32 color)
 Draw a thick line.
void hLine (int x, int y, int x2, uint32 color)
 Draw a horizontal line.
void vLine (int x, int y, int y2, uint32 color)
 Draw a vertical line.
void fillRect (Common::Rect r, uint32 color)
 Fill a rect with a given color.
void frameRect (const Common::Rect &r, uint32 color)
 Draw a frame around a specified rect.
Surface getSubArea (const Common::Rect &area)
 Returns a sub-area of the screen, but only adds a single initial dirty rect for the retrieved area.
void convertToInPlace (const PixelFormat &dstFormat, const byte *palette=0)
 Convert the data to another pixel format.
uint getTransparentColor () const
 Returns the current transparent color.
void setTransparentColor (uint color)
 Sets the transparent color.
void clearTransparentColor ()
 Clears the transparent color setting.
bool hasTransparentColor () const
 Returns true if a transparent color has been set.
void clearPalette ()
 Clear any existing palette.
const uint32getPalette () const
 Gets the palette array.
void setPalette (const byte *colors, uint start, uint num)
 Sets the palette using RGB tuplets.
void setPalette (const uint32 *colors, uint start, uint num)
 Sets the palette using RGBA values.

Public Attributes

uint16w
uint16h
uint16pitch
PixelFormatformat

Protected Member Functions

virtual void addDirtyRect (const Common::Rect &r)
 Base method that descendent classes can override for recording affected dirty areas of the surface.
void blitFromInner (const Surface &src, const Common::Rect &srcRect, const Common::Point &destPos, const uint32 *palette)
 Inner method for blitting.
void transBlitFromInner (const Surface &src, const Common::Rect &srcRect, const Common::Rect &destRect, uint transColor, bool flipped, uint overrideColor, uint srcAlpha, const uint32 *palette, const Surface *mask, bool maskOnly)
 Inner method for copying another surface into this one at a given destination position.

Private Attributes

Surface _innerSurface
 The Graphics::Surface that the managed surface encapsulates.
DisposeAfterUse::Flag _disposeAfterUse
 If set, the inner surface will be freed when the surface is recreated, as well as when the surface is destroyed.
ManagedSurface_owner
 Stores the owning surface if this If this managed surface represents a sub-section of another.
Common::Point _offsetFromOwner
 For sub-section areas of an owning parent managed surface, this represents the offset from the parent's top-left corner this sub-surface starts at.
uint _transparentColor
 Automatic transparency color.
bool _transparentColorSet
uint32 _palette [256]
 Local palette for 8-bit images.
bool _paletteSet

Friends

class Font

Detailed Description

A derived graphics surface, which handles automatically managing the allocated surface data block, as well as introducing several new blitting methods.

Definition at line 39 of file managed_surface.h.


Constructor & Destructor Documentation

Graphics::ManagedSurface::ManagedSurface (  ) 

Create the managed surface.

Definition at line 31 of file managed_surface.cpp.

Graphics::ManagedSurface::ManagedSurface ( const ManagedSurface surf  ) 

Create a managed surface from another one.

If the source surface is maintaining it's own surface data, then this surface will create it's own surface of the same size and copy the contents from the source surface

Definition at line 38 of file managed_surface.cpp.

Graphics::ManagedSurface::ManagedSurface ( int  width,
int  height 
)

Create the managed surface.

Definition at line 46 of file managed_surface.cpp.

Graphics::ManagedSurface::ManagedSurface ( int  width,
int  height,
const Graphics::PixelFormat pixelFormat 
)

Create the managed surface.

Definition at line 54 of file managed_surface.cpp.

Graphics::ManagedSurface::ManagedSurface ( ManagedSurface surf,
const Common::Rect bounds 
)

Create the managed surface.

Definition at line 62 of file managed_surface.cpp.

Graphics::ManagedSurface::~ManagedSurface (  )  [virtual]

Destroy the managed surface.

Definition at line 70 of file managed_surface.cpp.


Member Function Documentation

void Graphics::ManagedSurface::addDirtyRect ( const Common::Rect r  )  [protected, virtual]

Base method that descendent classes can override for recording affected dirty areas of the surface.

Reimplemented in Graphics::Screen.

Definition at line 485 of file managed_surface.cpp.

void Graphics::ManagedSurface::blitFrom ( const Surface src  ) 

Copies another surface into this one.

Definition at line 186 of file managed_surface.cpp.

void Graphics::ManagedSurface::blitFrom ( const Surface src,
const Common::Point destPos 
)

Copies another surface into this one at a given destination position.

Definition at line 190 of file managed_surface.cpp.

void Graphics::ManagedSurface::blitFrom ( const Surface src,
const Common::Rect srcRect,
const Common::Point destPos 
)

Copies another surface into this one at a given destination position.

Definition at line 194 of file managed_surface.cpp.

void Graphics::ManagedSurface::blitFrom ( const ManagedSurface src  ) 

Copies another surface into this one.

Definition at line 199 of file managed_surface.cpp.

void Graphics::ManagedSurface::blitFrom ( const ManagedSurface src,
const Common::Point destPos 
)

Copies another surface into this one at a given destination position.

Definition at line 203 of file managed_surface.cpp.

void Graphics::ManagedSurface::blitFrom ( const ManagedSurface src,
const Common::Rect srcRect,
const Common::Point destPos 
)

Copies another surface into this one at a given destination position.

Definition at line 207 of file managed_surface.cpp.

void Graphics::ManagedSurface::blitFromInner ( const Surface src,
const Common::Rect srcRect,
const Common::Point destPos,
const uint32 palette 
) [protected]

Inner method for blitting.

Definition at line 215 of file managed_surface.cpp.

void Graphics::ManagedSurface::clear ( uint  color = 0  ) 

Clear the entire surface.

Definition at line 494 of file managed_surface.cpp.

virtual void Graphics::ManagedSurface::clearDirtyRects (  )  [inline, virtual]

Clears any pending dirty rects that have been generated for the surface.

Reimplemented in Graphics::Screen.

Definition at line 226 of file managed_surface.h.

void Graphics::ManagedSurface::clearPalette (  )  [inline]

Clear any existing palette.

Reimplemented in Graphics::Screen.

Definition at line 547 of file managed_surface.h.

void Graphics::ManagedSurface::clearTransparentColor (  )  [inline]

Clears the transparent color setting.

Definition at line 533 of file managed_surface.h.

bool Graphics::ManagedSurface::clip ( Common::Rect srcBounds,
Common::Rect destBounds 
)

Clips the given source bounds so the passed destBounds will be entirely on-screen.

Definition at line 157 of file managed_surface.cpp.

void Graphics::ManagedSurface::convertToInPlace ( const PixelFormat dstFormat,
const byte palette = 0 
) [inline]

Convert the data to another pixel format.

This works in-place. This means it will not create an additional buffer for the conversion process. The value of 'pixels' might change though (that means it might realloc the pixel data).

Parameters:
dstFormat The desired format
palette The palette (in RGB888), if the source format has a Bpp of 1

Definition at line 513 of file managed_surface.h.

void Graphics::ManagedSurface::copyFrom ( const ManagedSurface surf  ) 

Copy the data from another Surface, reinitializing the surface to match the dimensions of the passed surface.

Definition at line 139 of file managed_surface.cpp.

void Graphics::ManagedSurface::copyRectToSurface ( const void *  buffer,
int  srcPitch,
int  destX,
int  destY,
int  width,
int  height 
) [inline]

Copies a bitmap to the Surface internal buffer.

The pixel format of buffer must match the pixel format of the Surface.

Definition at line 428 of file managed_surface.h.

void Graphics::ManagedSurface::copyRectToSurface ( const Graphics::Surface srcSurface,
int  destX,
int  destY,
const Common::Rect  subRect 
) [inline]

Copies a bitmap to the Surface internal buffer.

The pixel format of buffer must match the pixel format of the Surface.

Definition at line 436 of file managed_surface.h.

void Graphics::ManagedSurface::create ( uint16  width,
uint16  height,
const PixelFormat pixelFormat 
) [virtual]

Allocate memory for the pixel data of the surface.

Definition at line 107 of file managed_surface.cpp.

void Graphics::ManagedSurface::create ( ManagedSurface surf,
const Common::Rect bounds 
) [virtual]

Sets up the surface as a sub-section of another passed parent surface.

This surface will not own the pixels, and any dirty rect notifications will automatically be passed to the original parent surface.

Remarks:
Note that this differs from Graphics::Surface::getSubArea, in that that method only adds a single initial dirty rect for the whole area, and then none further

Definition at line 115 of file managed_surface.cpp.

void Graphics::ManagedSurface::create ( uint16  width,
uint16  height 
) [virtual]

Allocate memory for the pixel data of the surface.

Definition at line 103 of file managed_surface.cpp.

DisposeAfterUse::Flag Graphics::ManagedSurface::disposeAfterUse (  )  const [inline]

Returns true if the surface is managing its own pixels.

Definition at line 163 of file managed_surface.h.

void Graphics::ManagedSurface::drawLine ( int  x0,
int  y0,
int  x1,
int  y1,
uint32  color 
) [inline]

Draw a line.

Definition at line 449 of file managed_surface.h.

void Graphics::ManagedSurface::drawThickLine ( int  x0,
int  y0,
int  x1,
int  y1,
int  penX,
int  penY,
uint32  color 
) [inline]

Draw a thick line.

Definition at line 457 of file managed_surface.h.

bool Graphics::ManagedSurface::empty (  )  const [inline]

Returns true if the surface has not yet been allocated.

Definition at line 158 of file managed_surface.h.

void Graphics::ManagedSurface::fillRect ( Common::Rect  r,
uint32  color 
) [inline]

Fill a rect with a given color.

Definition at line 481 of file managed_surface.h.

void Graphics::ManagedSurface::frameRect ( const Common::Rect r,
uint32  color 
) [inline]

Draw a frame around a specified rect.

Definition at line 489 of file managed_surface.h.

void Graphics::ManagedSurface::free (  )  [virtual]

Release the memory used by the pixels memory of this surface.

This is the counterpart to create().

Definition at line 128 of file managed_surface.cpp.

void* Graphics::ManagedSurface::getBasePtr ( int  x,
int  y 
) [inline]

Return a pointer to the pixel at the specified point.

Parameters:
x The x coordinate of the pixel.
y The y coordinate of the pixel.
Returns:
Pointer to the pixel.

Definition at line 183 of file managed_surface.h.

const void* Graphics::ManagedSurface::getBasePtr ( int  x,
int  y 
) const [inline]

Return a pointer to the pixel at the specified point.

Parameters:
x The x coordinate of the pixel.
y The y coordinate of the pixel.
Returns:
Pointer to the pixel.

Definition at line 172 of file managed_surface.h.

const Common::Rect Graphics::ManagedSurface::getBounds (  )  const [inline]

Return a rect giving the bounds of the surface.

Definition at line 237 of file managed_surface.h.

const Common::Point Graphics::ManagedSurface::getOffsetFromOwner (  )  const [inline]

When the managed surface is a sub-section of a parent surface, returns the the offset in the parent surface that the surface starts at.

Definition at line 232 of file managed_surface.h.

const uint32* Graphics::ManagedSurface::getPalette (  )  const [inline]

Gets the palette array.

Definition at line 554 of file managed_surface.h.

const void* Graphics::ManagedSurface::getPixels (  )  const [inline]

Definition at line 191 of file managed_surface.h.

void* Graphics::ManagedSurface::getPixels (  )  [inline]

Get a reference to the pixel data.

Definition at line 190 of file managed_surface.h.

Surface Graphics::ManagedSurface::getSubArea ( const Common::Rect area  )  [inline]

Returns a sub-area of the screen, but only adds a single initial dirty rect for the retrieved area.

Definition at line 498 of file managed_surface.h.

uint Graphics::ManagedSurface::getTransparentColor (  )  const [inline]

Returns the current transparent color.

Definition at line 520 of file managed_surface.h.

bool Graphics::ManagedSurface::hasTransparentColor (  )  const [inline]

Returns true if a transparent color has been set.

Definition at line 540 of file managed_surface.h.

void Graphics::ManagedSurface::hLine ( int  x,
int  y,
int  x2,
uint32  color 
) [inline]

Draw a horizontal line.

Definition at line 465 of file managed_surface.h.

void Graphics::ManagedSurface::markAllDirty (  ) 

Mark the entire surface as dirty.

Definition at line 481 of file managed_surface.cpp.

Graphics::ManagedSurface::operator const Surface & (  )  const [inline]

Implements automatic conversion to a Graphics::Surface by simply returning the inner surface.

This must be const, because we don't want changes being done directly to it, since it would bypass dirty rect handling

Definition at line 146 of file managed_surface.h.

ManagedSurface & Graphics::ManagedSurface::operator= ( const ManagedSurface surf  ) 

Reassign one managed surface to another one Note that if the source has a managed surface, it will be duplicated.

Definition at line 74 of file managed_surface.cpp.

const Surface& Graphics::ManagedSurface::rawSurface (  )  const [inline]

Definition at line 147 of file managed_surface.h.

void Graphics::ManagedSurface::setPalette ( const uint32 colors,
uint  start,
uint  num 
)

Sets the palette using RGBA values.

Definition at line 510 of file managed_surface.cpp.

void Graphics::ManagedSurface::setPalette ( const byte colors,
uint  start,
uint  num 
)

Sets the palette using RGB tuplets.

Reimplemented in Graphics::Screen.

Definition at line 499 of file managed_surface.cpp.

void Graphics::ManagedSurface::setPixels ( void *  newPixels  )  [virtual]

Sets the pixel data.

Definition at line 98 of file managed_surface.cpp.

void Graphics::ManagedSurface::setTransparentColor ( uint  color  )  [inline]

Sets the transparent color.

Definition at line 525 of file managed_surface.h.

void Graphics::ManagedSurface::transBlitFrom ( const Surface src,
const Common::Rect srcRect,
const Common::Point destPos,
uint  transColor = 0,
bool  flipped = false,
uint  overrideColor = 0,
uint  srcAlpha = 0xff 
)

Copies another surface into this one ignoring pixels of a designated transparent color.

Parameters:
src Source surface
srcRect Sub-section of source surface to draw
destPos Destination position to draw the surface
transColor Transparency color to ignore copying
flipped Specifies whether to horizontally flip the image
overrideColor Optional color to use instead of non-transparent pixels from the source surface
srcAlpha Optional additional transparency applied to src
mask Optional parameter with mask definition (0-skip, other-copy)
maskOnly Optional parameter for using mask over transColor

Definition at line 314 of file managed_surface.cpp.

void Graphics::ManagedSurface::transBlitFrom ( const ManagedSurface src,
const Common::Point destPos,
uint  transColor = 0,
bool  flipped = false,
uint  overrideColor = 0,
uint  srcAlpha = 0xff 
)

Copies another surface into this one ignoring pixels of a designated transparent color.

Parameters:
src Source surface
destPos Destination position to draw the surface
transColor Transparency color to ignore copying
flipped Specifies whether to horizontally flip the image
overrideColor Optional color to use instead of non-transparent pixels from the source surface
srcAlpha Optional additional transparency applied to src

Definition at line 333 of file managed_surface.cpp.

void Graphics::ManagedSurface::transBlitFrom ( const ManagedSurface src,
const Common::Rect srcRect,
const Common::Point destPos,
uint  transColor = 0,
bool  flipped = false,
uint  overrideColor = 0,
uint  srcAlpha = 0xff 
)

Copies another surface into this one ignoring pixels of a designated transparent color.

Parameters:
src Source surface
srcRect Sub-section of source surface to draw
destPos Destination position to draw the surface
transColor Transparency color to ignore copying
flipped Specifies whether to horizontally flip the image
overrideColor Optional color to use instead of non-transparent pixels from the source surface
srcAlpha Optional additional transparency applied to src

Definition at line 345 of file managed_surface.cpp.

void Graphics::ManagedSurface::transBlitFrom ( const Surface src,
uint  transColor = 0,
bool  flipped = false,
uint  overrideColor = 0,
uint  srcAlpha = 0xff 
)

Copies another surface into this one ignoring pixels of a designated transparent color.

Parameters:
src Source surface
transColor Transparency color to ignore copying
flipped Specifies whether to horizontally flip the image
overrideColor Optional color to use instead of non-transparent pixels from the source surface
srcAlpha Optional additional transparency applied to src

Definition at line 290 of file managed_surface.cpp.

void Graphics::ManagedSurface::transBlitFrom ( const Surface src,
const Common::Point destPos,
const Surface mask 
)

Copies another surface into this one ignoring pixels of a designated transparent color.

Parameters:
src Source surface
destPos Destination position to draw the surface
mask Mask definition (0-skip, other-copy)

Definition at line 308 of file managed_surface.cpp.

void Graphics::ManagedSurface::transBlitFrom ( const Surface src,
const Common::Point destPos,
const ManagedSurface mask 
)

Copies another surface into this one ignoring pixels of a designated transparent color.

Parameters:
src Source surface
destPos Destination position to draw the surface
mask Mask definition (0-skip, other-copy)

Definition at line 302 of file managed_surface.cpp.

void Graphics::ManagedSurface::transBlitFrom ( const Surface src,
const Common::Rect srcRect,
const Common::Rect destRect,
uint  transColor = 0,
bool  flipped = false,
uint  overrideColor = 0,
uint  srcAlpha = 0xff,
const Surface mask = nullptr,
bool  maskOnly = false 
)

Copies another surface into this one ignoring pixels of a designated transparent color.

Parameters:
src Source surface
srcRect Sub-section of source surface to draw
destRect Destination area to draw the surface in. This can be sized differently then srcRect, allowing for arbitrary scaling of the image
transColor Transparency color to ignore copying
flipped Specifies whether to horizontally flip the image
overrideColor Optional color to use instead of non-transparent pixels from the source surface
srcAlpha Optional additional transparency applied to src
mask Optional parameter with mask definition (0-skip, other-copy)
maskOnly Optional parameter for using mask over transColor

Definition at line 320 of file managed_surface.cpp.

void Graphics::ManagedSurface::transBlitFrom ( const ManagedSurface src,
const Common::Rect srcRect,
const Common::Rect destRect,
uint  transColor = 0,
bool  flipped = false,
uint  overrideColor = 0,
uint  srcAlpha = 0xff,
const Surface mask = nullptr,
bool  maskOnly = false 
)

Copies another surface into this one ignoring pixels of a designated transparent color.

Parameters:
src Source surface
srcRect Sub-section of source surface to draw
destRect Destination area to draw the surface in. This can be sized differently then srcRect, allowing for arbitrary scaling of the image
transColor Transparency color to ignore copying
flipped Specifies whether to horizontally flip the image
overrideColor Optional color to use instead of non-transparent pixels from the source surface
srcAlpha Optional additional transparency applied to src

Definition at line 353 of file managed_surface.cpp.

void Graphics::ManagedSurface::transBlitFrom ( const ManagedSurface src,
const Common::Point destPos,
const ManagedSurface mask 
)

Copies another surface into this one ignoring pixels of a designated transparent color.

Parameters:
src Source surface
destPos Destination position to draw the surface
mask Mask definition (0-skip, other-copy)

Definition at line 339 of file managed_surface.cpp.

void Graphics::ManagedSurface::transBlitFrom ( const Surface src,
const Common::Point destPos,
uint  transColor = 0,
bool  flipped = false,
uint  overrideColor = 0,
uint  srcAlpha = 0xff 
)

Copies another surface into this one ignoring pixels of a designated transparent color.

Parameters:
src Source surface
destPos Destination position to draw the surface
transColor Transparency color to ignore copying
flipped Specifies whether to horizontally flip the image
overrideColor Optional color to use instead of non-transparent pixels from the source surface
srcAlpha Optional additional transparency applied to src

Definition at line 296 of file managed_surface.cpp.

void Graphics::ManagedSurface::transBlitFrom ( const ManagedSurface src,
uint  transColor = 0,
bool  flipped = false,
uint  overrideColor = 0,
uint  srcAlpha = 0xff 
)

Copies another surface into this one ignoring pixels of a designated transparent color.

Parameters:
src Source surface
transColor Transparency color to ignore copying
flipped Specifies whether to horizontally flip the image
overrideColor Optional color to use instead of non-transparent pixels from the source surface
srcAlpha Optional additional transparency applied to src

Definition at line 327 of file managed_surface.cpp.

void Graphics::ManagedSurface::transBlitFromInner ( const Surface src,
const Common::Rect srcRect,
const Common::Rect destRect,
uint  transColor,
bool  flipped,
uint  overrideColor,
uint  srcAlpha,
const uint32 palette,
const Surface mask,
bool  maskOnly 
) [protected]

Inner method for copying another surface into this one at a given destination position.

Definition at line 455 of file managed_surface.cpp.

void Graphics::ManagedSurface::vLine ( int  x,
int  y,
int  y2,
uint32  color 
) [inline]

Draw a vertical line.

Definition at line 473 of file managed_surface.h.


Friends And Related Function Documentation

friend class Font [friend]

Definition at line 40 of file managed_surface.h.


Member Data Documentation

If set, the inner surface will be freed when the surface is recreated, as well as when the surface is destroyed.

Definition at line 51 of file managed_surface.h.

The Graphics::Surface that the managed surface encapsulates.

Definition at line 45 of file managed_surface.h.

For sub-section areas of an owning parent managed surface, this represents the offset from the parent's top-left corner this sub-surface starts at.

Definition at line 63 of file managed_surface.h.

Stores the owning surface if this If this managed surface represents a sub-section of another.

Definition at line 57 of file managed_surface.h.

Local palette for 8-bit images.

Definition at line 75 of file managed_surface.h.

Definition at line 76 of file managed_surface.h.

Automatic transparency color.

When set, doesn't require transparency to be explicitly passed, and blit methods pass on to transBlit

Definition at line 69 of file managed_surface.h.

Definition at line 70 of file managed_surface.h.


The documentation for this class was generated from the following files:


Generated on Sat Aug 8 2020 05:03:19 for ResidualVM by doxygen 1.7.1
curved edge   curved edge