Game Accessibility Library logo SourceForge.net Logo
Game Accessibility Suite: CATOverlay::SetOverlayImage
void CATOverlay::SetOverlayImage ( CATImage overlay,
const CATRect overlayRect,
CATInt32  refScreenWidth,
CATInt32  refScreenHeight,
bool  keepAspect = true 
)

Sets an image to overlay the display.

OverlayRect is the position of the overlay within the display. refScreenWidth and refScreenHeight are the virtual size of the display used to position the overlayRect onto the actual screen.

So, if you want, you can give it a 640x480 rect, with the ref width/height of 640x480, and it will fill the screen regardless of the screen's actual size.

Note that currently the image that is provided is assumed to be persistent until another image is sent (or null is passed for overlay). The overlay does not create a copy, but will use it asynchronously during the next draw. If you are using for dynamic content, keep the old image around until *after* you set a new overlay image.

Parameters:
overlay Image to overlay onto the screen, or 0 to reset to none.
overlayRect Virtual position/size of the overlay to draw on the screen.
refScreenWidth Virtual width of display, used to scale overlay to actual size.
regScreenHeight Virtual height of the display.

Definition at line 44 of file CATOverlay.cpp.

References fKeepAspect, fLock, fOverlay, fOverlayDirty, fOverlayRect, fRefScreenHeight, fRefScreenWidth, CATCritSec::Release(), and CATCritSec::Wait().


Generated on Mon Feb 11 04:10:46 2008 for Game Accessibility Suite by doxygen 1.5.4