csMemoryPen Class Reference
The memory pen is a caching pen object. More...
#include <cstool/pen.h>
Inheritance diagram for csMemoryPen:
Public Member Functions | |
virtual void | Clear () |
Clears the draw buffer out. | |
virtual void | ClearFlag (uint flag) |
Clears the given flag. | |
virtual void | ClearTransform () |
Clears the current transform, resets to identity. | |
csMemoryPen () | |
void | Draw (iPen *_pen_) |
Draws the cached contents of this buffer into the pen. | |
virtual void | DrawArc (uint x1, uint y1, uint x2, uint y2, float start_angle, float end_angle) |
Draws an elliptical arc from start angle to end angle. | |
virtual void | DrawLine (uint x1, uint y1, uint x2, uint y2) |
Draws a single line. | |
virtual void | DrawMiteredRect (uint x1, uint y1, uint x2, uint y2, uint miter) |
Draws a mitered rectangle. | |
virtual void | DrawPoint (uint x1, uint y2) |
Draws a single point. | |
virtual void | DrawRect (uint x1, uint y1, uint x2, uint y2) |
Draws a rectangle. | |
virtual void | DrawRoundedRect (uint x1, uint y1, uint x2, uint y2, uint roundness) |
Draws a rounded rectangle. | |
virtual void | DrawTriangle (uint x1, uint y1, uint x2, uint y2, uint x3, uint y3) |
Draws a triangle around the given vertices. | |
virtual void | PopTransform () |
Pops the transform stack. | |
virtual void | PushTransform () |
Pushes the current transform onto the stack. | |
virtual void | Rotate (const float &a) |
Rotates by the given angle. | |
virtual void | SetColor (const csColor4 &color) |
Sets the current color. | |
virtual void | SetColor (float r, float g, float b, float a) |
Sets the current color. | |
virtual void | SetFlag (uint flag) |
Sets the given flag. | |
virtual void | SetMixMode (uint mode) |
Sets the given mix (blending) mode. | |
virtual void | SetOrigin (const csVector3 &o) |
Sets the origin of the coordinate system. | |
virtual void | SetPenWidth (float width) |
Sets the width of the pen for line drawing. | |
virtual void | SetTexture (csRef< iTextureHandle > tex) |
Sets the texture handle. | |
virtual void | SwapColors () |
Swaps the current color and the alternate color. | |
virtual void | Translate (const csVector3 &t) |
Translates by the given vector. | |
virtual void | Write (iFont *font, uint x1, uint y1, char *text) |
Writes text in the given font at the given location. | |
virtual void | WriteBoxed (iFont *font, uint x1, uint y1, uint x2, uint y2, uint h_align, uint v_align, char *text) |
Writes text in the given font, in the given box. | |
virtual | ~csMemoryPen () |
Detailed Description
The memory pen is a caching pen object.The commands are written to memory, and then later may be replayed to some other pen.
Definition at line 460 of file pen.h.
Member Function Documentation
virtual void csMemoryPen::Clear | ( | ) | [virtual] |
Clears the draw buffer out.
virtual void csMemoryPen::ClearFlag | ( | uint | flag | ) | [virtual] |
virtual void csMemoryPen::ClearTransform | ( | ) | [virtual] |
void csMemoryPen::Draw | ( | iPen * | _pen_ | ) |
Draws the cached contents of this buffer into the pen.
virtual void csMemoryPen::DrawArc | ( | uint | x1, | |
uint | y1, | |||
uint | x2, | |||
uint | y2, | |||
float | start_angle, | |||
float | end_angle | |||
) | [virtual] |
Draws an elliptical arc from start angle to end angle.
Angle must be specified in radians. The arc will be made to fit in the given box. If you want a circular arc, make sure the box is a square. If you want a full circle or ellipse, specify 0 as the start angle and 2*PI as the end angle.
Implements iPen.
virtual void csMemoryPen::DrawMiteredRect | ( | uint | x1, | |
uint | y1, | |||
uint | x2, | |||
uint | y2, | |||
uint | miter | |||
) | [virtual] |
Draws a mitered rectangle.
The miter value should be between 0.0 and 1.0, and determines how much of the corner is mitered off and beveled.
Implements iPen.
virtual void csMemoryPen::DrawRoundedRect | ( | uint | x1, | |
uint | y1, | |||
uint | x2, | |||
uint | y2, | |||
uint | roundness | |||
) | [virtual] |
Draws a rounded rectangle.
The roundness value should be between 0.0 and 1.0, and determines how much of the corner is rounded off.
Implements iPen.
virtual void csMemoryPen::PopTransform | ( | ) | [virtual] |
virtual void csMemoryPen::PushTransform | ( | ) | [virtual] |
virtual void csMemoryPen::Rotate | ( | const float & | a | ) | [virtual] |
virtual void csMemoryPen::SetColor | ( | const csColor4 & | color | ) | [virtual] |
virtual void csMemoryPen::SetColor | ( | float | r, | |
float | g, | |||
float | b, | |||
float | a | |||
) | [virtual] |
virtual void csMemoryPen::SetFlag | ( | uint | flag | ) | [virtual] |
virtual void csMemoryPen::SetMixMode | ( | uint | mode | ) | [virtual] |
virtual void csMemoryPen::SetOrigin | ( | const csVector3 & | o | ) | [virtual] |
virtual void csMemoryPen::SetPenWidth | ( | float | width | ) | [virtual] |
virtual void csMemoryPen::SetTexture | ( | csRef< iTextureHandle > | tex | ) | [virtual] |
virtual void csMemoryPen::SwapColors | ( | ) | [virtual] |
virtual void csMemoryPen::Translate | ( | const csVector3 & | t | ) | [virtual] |
virtual void csMemoryPen::WriteBoxed | ( | iFont * | font, | |
uint | x1, | |||
uint | y1, | |||
uint | x2, | |||
uint | y2, | |||
uint | h_align, | |||
uint | v_align, | |||
char * | text | |||
) | [virtual] |
Writes text in the given font, in the given box.
The alignment specified in h_align and v_align determine how it should be aligned.
Implements iPen.
The documentation for this class was generated from the following file:
- cstool/pen.h
Generated for Crystal Space by doxygen 1.4.7