A VRAM accessor for the STAMP mode, a special purpose 16-color framebuffer mode which supports color-keying and tiling. More...
#include <sifteo/video/framebuffer.h>
Public Member Functions | |
CubeID | cube () const |
Return the CubeID associated with this drawable. | |
void | disableKey () |
Disable transparency. More... | |
template<unsigned tWidth, unsigned tHeight> | |
FBDrawable< tWidth, tHeight, 4 > & | getFB () |
Obtain an FBDrawable accessor for the framebuffer memory, using the supplied framebuffer dimensions. More... | |
template<unsigned tWidth, unsigned tHeight> | |
FBDrawable< tWidth, tHeight, 4 > & | initFB () |
Obtain an FBDrawable accessor for the framebuffer memory, using the supplied framebuffer dimensions. More... | |
void | resizeFB (Int2 pixelSize) |
Change the geometry of the framebuffer memory used by this stamp. More... | |
void | setBox (Int2 topLeft, Int2 size) |
Set both the horizontal and vertical windows, to define a 2D box of pixels that we'll draw into. More... | |
void | setHWindow (uint8_t firstColumn, uint8_t numColumns) |
Set the horizontal window. This is the mode-specific X-axis counterpart to VideoBuffer::setWindow(). More... | |
void | setKeyIndex (unsigned index) |
Set the palette index of the "key" color. More... | |
_SYSVideoBuffer & | videoBuffer () |
Return the VideoBuffer associated with this drawable. | |
A VRAM accessor for the STAMP mode, a special purpose 16-color framebuffer mode which supports color-keying and tiling.
It is so named because it can be used like a rubber stamp, to draw patterns or images over top of whatever already exists on the display.
|
inline |
Disable transparency.
This is equivalent to setting the key index to a color which is never used.
|
inline |
Obtain an FBDrawable accessor for the framebuffer memory, using the supplied framebuffer dimensions.
Does not automatically resize the framebuffer to those dimensions; this is for cases when you know the framebuffer is already set up. If you don't know this for sure, or you're accessing the framebuffer for the first time without an explicit call to resize(), use initFB() instead.
|
inline |
Obtain an FBDrawable accessor for the framebuffer memory, using the supplied framebuffer dimensions.
Automatically resizes the framebuffer to the specified dimensions, if necessary. Just like VideoBuffer::initMode() we automatically issue a System::finish() before resizing the framebuffer.
|
inline |
Change the geometry of the framebuffer memory used by this stamp.
The framebuffer can be any size, so long as the width is an even number of pixels (corresponding to an integer number of bytes), the total number of pixels <= 1536, and each dimension is <= 128.
Set both the horizontal and vertical windows, to define a 2D box of pixels that we'll draw into.
If either dimension of this box is larger than our framebuffer, the framebuffer will be tiled.
|
inline |
Set the horizontal window. This is the mode-specific X-axis counterpart to VideoBuffer::setWindow().
We start drawing at 'firstColumn', and draw a total of 'numColumns' pixels per line. If numColumns is greater than the framebuffer width, the framebuffer repeats horizontally.
|
inline |
Set the palette index of the "key" color.
Any pixel with this palette index is skipped, leaving a transparent "hole" at that pixel.
Sifteo SDK v1.1.0 (see all versions)
Last updated Tue Dec 23 2014, by Doxygen