#include <OpenGUI_Brush.h>
Inheritance diagram for OpenGUI::Brush:

The Brush object is provided during widget onDraw events, and is used by the widget to draw itself. Functions that should use the Brush object will be provided one as a function parameter.
Public Member Functions | |
| Brush () | |
| Constructor. | |
| virtual | ~Brush () |
| Destructor. | |
| void | pushPosition (float x_offset, float y_offset) |
| Pushes a position offset onto the stack. | |
| void | pushPosition (const FVector2 &offset) |
| Pushes a position offset onto the stack. | |
| void | pushRotation (const Radian &angle) |
| Pushes a rotation offset onto the stack. | |
| void | pushColor (const Color &color) |
| Pushes a new color onto the stack. | |
| void | pushAlpha (float alpha) |
| Pushes another layer of alpha transparency onto the stack. | |
| void | pushClippingRect (const FRect &rect) |
| Pushes a new clipping rect onto the stack. | |
| void | pushMask (ImageryPtr mask_imagery, const FRect &mask_rect) |
| Pushes an imagery based mask onto the stack. | |
| void | pushMaskUnscaled (ImageryPtr mask_imagery, const FVector2 &mask_position) |
| Pushes an imagery based mask onto the stack. | |
| void | pushPixelAlignment () |
| Pushes a position offset onto the stack that aligns the origin with the nearest pixel of this Brush's output target. | |
| void | pop () |
| Pops the last modifier off the stack. | |
| void | _pushMarker (void *markerID) |
| void | _popMarker (void *markerID) |
| virtual const FVector2 & | getPPU_Raw () const =0 |
| Returns the raw (uncorrected) PPU (pixels per unit) of this Brush. | |
| virtual const FVector2 & | getUPI_Raw () const =0 |
| Returns the raw (uncorrected) UPI (units per inch) of this Brush. | |
| const Radian & | getRotation () |
| returns the Brush's current total rotation | |
| const FVector2 & | getPPU () |
| Returns the PPU mapped against the Brush's current rotation. | |
| const FVector2 & | getUPI () |
| Returns the UPI mapped against the Brush's current rotation. | |
| virtual bool | isRTTContext () const =0 |
| returns true if the brush context is a render to texture surface | |
Public Attributes | |
| BrushPrimitive | Primitive |
| access to primitive drawing operations | |
| BrushImagery | Image |
| access to imagery based drawing operations | |
| BrushText | Text |
| access to text drawing operations | |
Protected Member Functions | |
| virtual void | appendRenderOperation (RenderOperation &renderOp) |
| Final output RenderOperations are passed to this function. | |
| virtual void | onActivate ()=0 |
| Called automatically when this Brush becomes the active Brush. | |
| virtual void | onClear ()=0 |
| Called when this Brush has been told to clear the contents of its render surface. | |
| void | markActive () |
| Marks this brush as the active brush, if it is not already. | |
| bool | isActive () |
returns true if this is marked as the active brush | |
| void | _clear () |
| Clears the contents of this Brush's output target. | |
|
|
Constructor.
|
|
|
Destructor.
|
|
|
Clears the contents of this Brush's output target. This is not something that most users would want to do. |
|
|
|
|
|
|
|
|
Final output RenderOperations are passed to this function. It is up to specialized Brush implementations to capture final output with this function. At this point, the Brush is guaranteed to already to be active. Reimplemented in OpenGUI::Brush_Caching, OpenGUI::Brush_Memory, and OpenGUI::Brush_RTT. |
|
|
Returns the PPU mapped against the Brush's current rotation.
|
|
|
Returns the raw (uncorrected) PPU (pixels per unit) of this Brush.
Implemented in OpenGUI::Brush_Caching, OpenGUI::Brush_Memory, and OpenGUI::Brush_RTT. |
|
|
returns the Brush's current total rotation
|
|
|
Returns the UPI mapped against the Brush's current rotation.
|
|
|
Returns the raw (uncorrected) UPI (units per inch) of this Brush.
Implemented in OpenGUI::Brush_Caching, OpenGUI::Brush_Memory, and OpenGUI::Brush_RTT. |
|
|
returns
|
|
|
returns true if the brush context is a render to texture surface
Implemented in OpenGUI::Brush_Caching, OpenGUI::Brush_Memory, and OpenGUI::Brush_RTT. |
|
|
Marks this brush as the active brush, if it is not already.
|
|
|
Called automatically when this Brush becomes the active Brush.
Implemented in OpenGUI::Brush_Caching, OpenGUI::Brush_Memory, and OpenGUI::Brush_RTT. |
|
|
Called when this Brush has been told to clear the contents of its render surface. The Brush is guaranteed to be active at this point Implemented in OpenGUI::Brush_Caching, OpenGUI::Brush_Memory, and OpenGUI::Brush_RTT. |
|
|
Pops the last modifier off the stack.
|
|
|
Pushes another layer of alpha transparency onto the stack.
|
|
|
Pushes a new clipping rect onto the stack.
|
|
|
Pushes a new color onto the stack.
|
|
||||||||||||
|
Pushes an imagery based mask onto the stack.
|
|
||||||||||||
|
Pushes an imagery based mask onto the stack.
|
|
|
Pushes a position offset onto the stack that aligns the origin with the nearest pixel of this Brush's output target. This is as close to pixel alignment as you can get. Things like rotation will cause inaccurate results, but in those cases pixel alignment is neither achievable nor necessary. |
|
|
Pushes a position offset onto the stack.
|
|
||||||||||||
|
Pushes a position offset onto the stack.
|
|
|
Pushes a rotation offset onto the stack. Positive values result in clockwise rotation. |
|
|
access to imagery based drawing operations
|
|
|
access to primitive drawing operations
|
|
|
access to text drawing operations
|