30 #ifndef vtkOpenGLContextDevice2D_h
31 #define vtkOpenGLContextDevice2D_h
33 #include "vtkRenderingContextOpenGL2Module.h"
67 virtual void DrawPoly(
float *f,
int n,
unsigned char *colors = 0,
76 virtual void DrawLines(
float *f,
int n,
unsigned char *colors = 0,
94 unsigned char* colors = 0,
int nc_comps = 0);
108 unsigned char *colors = 0,
int nc_comps = 0);
117 vtkGetMacro(MaximumMarkerCacheSize,
int)
123 virtual
void DrawQuad(
float *
points,
int n);
128 virtual
void DrawQuadStrip(
float *points,
int n);
133 virtual
void DrawPolygon(
float *,
int);
146 virtual
void DrawEllipseWedge(
float x,
float y,
float outRx,
float outRy,
156 virtual
void DrawEllipticArc(
float x,
float y,
float rX,
float rY,
157 float startAngle,
float stopAngle);
173 virtual
void ComputeStringBounds(const
vtkStdString &
string,
197 virtual
void ComputeJustifiedStringBounds(const
char*
string,
float bounds[4]);
203 virtual
void DrawMathTextString(
float point[2], const
vtkStdString &
string);
221 virtual
void SetColor4(
unsigned char color[4]);
226 virtual
void SetColor(
unsigned char color[3]);
231 virtual
void SetTexture(
vtkImageData* image,
int properties = 0);
236 virtual
void SetPointSize(
float size);
241 virtual
void SetLineWidth(
float width);
246 virtual
void SetLineType(
int type);
266 virtual
void PushMatrix();
271 virtual
void PopMatrix();
277 virtual
void SetClipping(
int *x);
282 virtual
void EnableClipping(
bool enable);
310 virtual
void BufferIdModeEnd();
317 bool SetStringRendererToFreeType();
323 bool SetStringRendererToQt();
342 virtual
void ReleaseGraphicsResources(
vtkWindow *window);
354 virtual ~vtkOpenGLContextDevice2D();
363 int GetNumberOfArcIterations(
float rX,
399 vtkOpenGLRenderWindow* RenderWindow;
402 void ReadyLinesCBOProgram();
404 void ReadyLinesBOProgram();
406 void ReadyVCBOProgram();
408 void ReadyVBOProgram();
410 void ReadyVTBOProgram();
412 void ReadySCBOProgram();
414 void ReadySBOProgram();
419 unsigned char *coolors,
int nc,
421 void CoreDrawTriangles(std::
vector<
float> &tverts);
424 unsigned short LinePattern;
431 void DrawMarkersGL2PS(
int shape,
bool highlight,
float *points,
int n,
432 unsigned char *colors,
int nc_comps);
433 void DrawCrossMarkersGL2PS(
bool highlight,
float *points,
int n,
434 unsigned char *colors,
int nc_comps);
435 void DrawPlusMarkersGL2PS(
bool highlight,
float *points,
int n,
436 unsigned char *colors,
int nc_comps);
437 void DrawSquareMarkersGL2PS(
bool highlight,
float *points,
int n,
438 unsigned char *colors,
int nc_comps);
439 void DrawCircleMarkersGL2PS(
bool highlight,
float *points,
int n,
440 unsigned char *colors,
int nc_comps);
441 void DrawDiamondMarkersGL2PS(
bool highlight,
float *points,
int n,
442 unsigned char *colors,
int nc_comps);
450 void DrawImageGL2PS(
float p[2],
float scale,
vtkImageData *image);
458 void DrawCircleGL2PS(
float x,
float y,
float rX,
float rY);
459 void DrawWedgeGL2PS(
float x,
float y,
float outRx,
float outRy,
460 float inRx,
float inRy);
466 void DrawMathTextStringGL2PS(
float point[2], const
vtkStdString &
string);
471 void AddEllipseToPath(
vtkPath *path,
float x,
float y,
float rx,
float ry,
477 void TransformPath(
vtkPath *path) const;
482 void TransformPoint(
float &x,
float &y) const;
487 void TransformSize(
float &dx,
float &dy) const;
490 vtkOpenGLContextDevice2D(const vtkOpenGLContextDevice2D &) VTK_DELETE_FUNCTION;
491 void operator=(const vtkOpenGLContextDevice2D &) VTK_DELETE_FUNCTION;
501 vtkImageData *GetMarker(
int shape,
int size,
bool highlight);
503 class vtkMarkerCacheObject
510 return this->Key ==
key;
517 std::list<vtkMarkerCacheObject> MarkerCache;
518 int MaximumMarkerCacheSize;
528 #endif //vtkOpenGLContextDevice2D_h
Wrapper around std::string to keep symbols short.
represent and manipulate 4x4 transformation matrices
concrete dataset representing a path defined by Bezier curves.
abstract specification for Viewports
Class for drawing 2D primitives using OpenGL 1.1+.
abstract specification for renderers
static vtkContextDevice2D * New()
virtual void DrawPoints(float *points, int n, unsigned char *colors=0, int nc_comps=0)=0
Draw a series of points - fastest code path due to memory layout of the coordinates.
virtual void DrawMarkers(int shape, bool highlight, float *points, int n, unsigned char *colors=0, int nc_comps=0)
Draw a series of markers centered at the points supplied.
base class for classes that render supplied text to an image.
window superclass for vtkRenderWindow
virtual void DrawPoly(float *points, int n, unsigned char *colors=0, int nc_comps=0)=0
Draw a poly line using the points - fastest code path due to memory layout of the coordinates...
a simple class to control print indentation
topologically and geometrically regular array of data
Abstract class for drawing 2D primitives.
Interface class for querying and using OpenGL extensions.
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkWeakPointer< vtkRenderWindow > RenderWindow
2D array of ids, used for picking.
virtual void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
VTKCOMMONCORE_EXPORT bool operator==(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
represent and manipulate 3x3 transformation matrices
virtual void DrawLines(float *f, int n, unsigned char *colors=0, int nc_comps=0)=0
Draw lines using the points - memory layout is as follows: l1p1,l1p2,l2p1,l2p2... ...
virtual void DrawPointSprites(vtkImageData *sprite, float *points, int n, unsigned char *colors=0, int nc_comps=0)=0
Draw a series of point sprites, images centred at the points supplied.
String class that stores Unicode text.
The ShaderProgram uses one or more Shader objects.