VTK
|
Class for drawing 2D primitives using GL2PS. More...
#include <vtkGL2PSContextDevice2D.h>
Public Types | |
typedef vtkOpenGLContextDevice2D | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkGL2PSContextDevice2D * | NewInstance () const |
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | DrawQuadStrip (float *, int) |
virtual void | DrawPolygon (float *, int) |
virtual void | DrawQuad (float *points, int n) |
virtual void | DrawString (float *point, const vtkStdString &string) |
virtual void | DrawString (float *point, const vtkUnicodeString &string) |
virtual void | DrawMathTextString (float point[2], const vtkStdString &string) |
void | ApplyPen (vtkPen *pen) |
virtual void | SetPointSize (float size) |
virtual void | SetLineWidth (float width) |
virtual void | SetLineType (int type) |
virtual void | DrawPoly (float *f, int n, unsigned char *colors=0, int nc_comps=0) |
virtual void | DrawPoints (float *points, int n, unsigned char *colors=0, int nc_comps=0) |
virtual void | DrawPointSprites (vtkImageData *sprite, float *points, int n, unsigned char *colors=0, int nc_comps=0) |
virtual void | DrawEllipseWedge (float x, float y, float outRx, float outRy, float inRx, float inRy, float startAngle, float stopAngle) |
virtual void | DrawEllipticArc (float x, float y, float rX, float rY, float startAngle, float stopAngle) |
virtual void | DrawMarkers (int shape, bool highlight, float *points, int n, unsigned char *colors=0, int nc_comps=0) |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkGL2PSContextDevice2D * | SafeDownCast (vtkObjectBase *o) |
static vtkGL2PSContextDevice2D * | New () |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () const |
vtkGL2PSContextDevice2D () | |
virtual | ~vtkGL2PSContextDevice2D () |
Class for drawing 2D primitives using GL2PS.
This class takes care of drawing the 2D primitives for the vtkContext2D class. In general this class should not be used directly, but is used internally by the vtkGL2PSExporter.
Definition at line 36 of file vtkGL2PSContextDevice2D.h.
Reimplemented from vtkOpenGLContextDevice2D.
Definition at line 40 of file vtkGL2PSContextDevice2D.h.
vtkGL2PSContextDevice2D::vtkGL2PSContextDevice2D | ( | ) | [protected] |
virtual vtkGL2PSContextDevice2D::~vtkGL2PSContextDevice2D | ( | ) | [protected, virtual] |
static int vtkGL2PSContextDevice2D::IsTypeOf | ( | const char * | name | ) | [static] |
Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkOpenGLContextDevice2D.
virtual int vtkGL2PSContextDevice2D::IsA | ( | const char * | name | ) | [virtual] |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkOpenGLContextDevice2D.
static vtkGL2PSContextDevice2D* vtkGL2PSContextDevice2D::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
Reimplemented from vtkOpenGLContextDevice2D.
virtual vtkObjectBase* vtkGL2PSContextDevice2D::NewInstanceInternal | ( | ) | const [protected, virtual] |
Reimplemented from vtkOpenGLContextDevice2D.
Reimplemented from vtkOpenGLContextDevice2D.
virtual void vtkGL2PSContextDevice2D::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) | [virtual] |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkOpenGLContextDevice2D.
static vtkGL2PSContextDevice2D* vtkGL2PSContextDevice2D::New | ( | ) | [static] |
Creates a 2D Painter object.
Reimplemented from vtkOpenGLContextDevice2D.
virtual void vtkGL2PSContextDevice2D::DrawPoly | ( | float * | f, |
int | n, | ||
unsigned char * | colors = 0 , |
||
int | nc_comps = 0 |
||
) | [virtual] |
Draw a poly line using the points - fastest code path due to memory layout of the coordinates. The line will be colored by colors array which has nc_comps components. If colors is not set and the current Pen's alpha channel is zero, no OpenGL calls are emitted.
Reimplemented from vtkOpenGLContextDevice2D.
virtual void vtkGL2PSContextDevice2D::DrawPoints | ( | float * | points, |
int | n, | ||
unsigned char * | colors = 0 , |
||
int | nc_comps = 0 |
||
) | [virtual] |
Draw a series of points - fastest code path due to memory layout of the coordinates. The colors and nc_comps are optional - color array.
Reimplemented from vtkOpenGLContextDevice2D.
virtual void vtkGL2PSContextDevice2D::DrawPointSprites | ( | vtkImageData * | sprite, |
float * | points, | ||
int | n, | ||
unsigned char * | colors = 0 , |
||
int | nc_comps = 0 |
||
) | [virtual] |
Draw a series of point sprites, images centred at the points supplied. The supplied vtkImageData is the sprite to be drawn, only squares will be drawn and the size is set using SetPointSize.
colors | is an optional array of colors. |
nc_comps | is the number of components for the color. |
Reimplemented from vtkOpenGLContextDevice2D.
virtual void vtkGL2PSContextDevice2D::DrawQuadStrip | ( | float * | , |
int | |||
) | [virtual] |
Draw a quad using the specified number of points.
Reimplemented from vtkOpenGLContextDevice2D.
virtual void vtkGL2PSContextDevice2D::DrawPolygon | ( | float * | , |
int | |||
) | [virtual] |
Draw a polygon using the specified number of points.
Reimplemented from vtkOpenGLContextDevice2D.
virtual void vtkGL2PSContextDevice2D::DrawEllipseWedge | ( | float | x, |
float | y, | ||
float | outRx, | ||
float | outRy, | ||
float | inRx, | ||
float | inRy, | ||
float | startAngle, | ||
float | stopAngle | ||
) | [virtual] |
Draw an elliptic wedge with center at x, y, outer radii outRx, outRy, inner radii inRx, inRy between angles startAngle and stopAngle (expressed in degrees).
Reimplemented from vtkOpenGLContextDevice2D.
virtual void vtkGL2PSContextDevice2D::DrawEllipticArc | ( | float | x, |
float | y, | ||
float | rX, | ||
float | rY, | ||
float | startAngle, | ||
float | stopAngle | ||
) | [virtual] |
Draw an elliptic arc with center at x,y with radii rX and rY between angles startAngle and stopAngle (expressed in degrees).
Reimplemented from vtkOpenGLContextDevice2D.
virtual void vtkGL2PSContextDevice2D::DrawMarkers | ( | int | shape, |
bool | highlight, | ||
float * | points, | ||
int | n, | ||
unsigned char * | colors = 0 , |
||
int | nc_comps = 0 |
||
) | [virtual] |
Draw a series of markers centered at the points supplied. The shape argument controls the marker shape, and can be one of - VTK_MARKER_CROSS - VTK_MARKER_PLUS - VTK_MARKER_SQUARE - VTK_MARKER_CIRCLE - VTK_MARKER_DIAMOND
colors | is an optional array of colors. |
nc_comps | is the number of components for the color. |
Reimplemented from vtkOpenGLContextDevice2D.
virtual void vtkGL2PSContextDevice2D::DrawQuad | ( | float * | points, |
int | n | ||
) | [virtual] |
Draws a rectangle
Reimplemented from vtkOpenGLContextDevice2D.
virtual void vtkGL2PSContextDevice2D::DrawString | ( | float * | point, |
const vtkStdString & | string | ||
) | [virtual] |
Draw some text to the screen!
Reimplemented from vtkOpenGLContextDevice2D.
virtual void vtkGL2PSContextDevice2D::DrawString | ( | float * | point, |
const vtkUnicodeString & | string | ||
) | [virtual] |
Draw some text to the screen.
Reimplemented from vtkOpenGLContextDevice2D.
virtual void vtkGL2PSContextDevice2D::DrawMathTextString | ( | float | point[2], |
const vtkStdString & | string | ||
) | [virtual] |
Draw text using MathText markup for mathematical equations. See http://matplotlib.sourceforge.net/users/mathtext.html for more information.
Reimplemented from vtkOpenGLContextDevice2D.
void vtkGL2PSContextDevice2D::ApplyPen | ( | vtkPen * | pen | ) |
Apply the supplied pen which controls the outlines of shapes, as well as lines, points and related primitives. This makes a deep copy of the vtkPen object in the vtkContext2D, it does not hold a pointer to the supplied object.
Reimplemented from vtkContextDevice2D.
virtual void vtkGL2PSContextDevice2D::SetPointSize | ( | float | size | ) | [virtual] |
Set the point size for glyphs/sprites.
Reimplemented from vtkOpenGLContextDevice2D.
virtual void vtkGL2PSContextDevice2D::SetLineWidth | ( | float | width | ) | [virtual] |
Set the line width for glyphs/sprites.
Reimplemented from vtkOpenGLContextDevice2D.
virtual void vtkGL2PSContextDevice2D::SetLineType | ( | int | type | ) | [virtual] |
Set the line type type (using anonymous enum in vtkPen).
Reimplemented from vtkOpenGLContextDevice2D.