Classes | |
| struct | ImageInfo |
| internal struct that holds info about a single image to be drawn. | |
| struct | TextInfo |
| internal struct that holds info about text to be drawn. | |
Public Member Functions | |
| RenderCache () | |
| Constructor. | |
| ~RenderCache () | |
| Destructor. | |
| bool | hasCachedImagery () const |
| Return whether the cache contains anything to draw. | |
| void | render (const Point &basePos, float baseZ, const Rect &clipper) |
| Send the contents of the cache to the Renderer. | |
| void | clearCachedImagery () |
| Erase any stored image information. | |
| void | cacheImage (const Image &image, const Rect &destArea, float zOffset, const ColourRect &cols, const Rect *clipper=0, bool clipToDisplay=false) |
| Add an image to the cache. | |
| void | cacheText (const String &text, Font *font, TextFormatting format, const Rect &destArea, float zOffset, const ColourRect &cols, const Rect *clipper=0, bool clipToDisplay=false) |
| Add a text to the cache. | |
This is in many ways an optimisation cache, it allows a full image redraw to occur while limiting the amount of information that needs to be re-calculated.
| void CEGUI::RenderCache::cacheImage | ( | const Image & | image, | |
| const Rect & | destArea, | |||
| float | zOffset, | |||
| const ColourRect & | cols, | |||
| const Rect * | clipper = 0, |
|||
| bool | clipToDisplay = false | |||
| ) |
Add an image to the cache.
| image | Image object to be cached. | |
| destArea | Destination area over which the Image object will be rendered. This area should be position independant; so position (0,0) will be to top-left corner of whatever it is you're rendering (like a Window for example). | |
| zOffset | Zero based z offset for this image. Allows imagery to be layered. | |
| cols | ColourRect object describing the colours to be applied when rendering this image. |
Referenced by CEGUI::FalagardMultiLineEditbox::cacheTextLines(), CEGUI::ImageryComponent::render_impl(), and CEGUI::FrameComponent::render_impl().
| void CEGUI::RenderCache::cacheText | ( | const String & | text, | |
| Font * | font, | |||
| TextFormatting | format, | |||
| const Rect & | destArea, | |||
| float | zOffset, | |||
| const ColourRect & | cols, | |||
| const Rect * | clipper = 0, |
|||
| bool | clipToDisplay = false | |||
| ) |
Add a text to the cache.
| text | String object to be cached. | |
| font | Font to be used when rendering. | |
| format | TextFormatting value specifying the formatting to use when rendering. | |
| destArea | Destination area over which the Image object will be rendered. This area should be position independant; so position (0,0) will be to top-left corner of whatever it is you're rendering (like a Window for example). | |
| zOffset | Zero based z offset for this image. Allows imagery to be layered. | |
| cols | ColourRect object describing the colours to be applied when rendering this image. |
Referenced by CEGUI::FalagardMultiLineEditbox::cacheTextLines(), CEGUI::FalagardEditbox::render(), and CEGUI::TextComponent::render_impl().
| bool CEGUI::RenderCache::hasCachedImagery | ( | ) | const |
Return whether the cache contains anything to draw.
Referenced by CEGUI::Window::drawSelf().
Send the contents of the cache to the Renderer.
| basePos | Point that describes a screen offset that cached imagery will be rendered relative to. | |
| baseZ | Z value that cached imagery will use as a base figure when calculating final z values. | |
| clipper | Rect object describing a rect to which imagery will be clipped. |
References CEGUI::Rect::getIntersection(), CEGUI::System::getSingleton(), and CEGUI::Rect::offset().
Referenced by CEGUI::Window::drawSelf().
1.5.7.1