30 #ifndef vtkOpenGLContextDevice2D_h
31 #define vtkOpenGLContextDevice2D_h
33 #include "vtkRenderingContextOpenGL2Module.h"
67 void DrawPoly(
float *f,
int n,
unsigned char *colors = 0,
68 int nc_comps = 0) VTK_OVERRIDE;
76 void DrawLines(
float *f,
int n,
unsigned char *colors = 0,
77 int nc_comps = 0) VTK_OVERRIDE;
84 void DrawPoints(
float *
points,
int n,
unsigned char* colors = 0,
85 int nc_comps = 0) VTK_OVERRIDE;
93 void DrawPointSprites(
vtkImageData *sprite,
float *points,
int n,
94 unsigned char* colors = 0,
int nc_comps = 0) VTK_OVERRIDE;
107 void DrawMarkers(
int shape,
bool highlight,
float *points,
int n,
108 unsigned char *colors = 0,
int nc_comps = 0) VTK_OVERRIDE;
117 vtkGetMacro(MaximumMarkerCacheSize,
int)
123 void DrawQuad(
float *points,
int n) VTK_OVERRIDE;
128 void DrawQuadStrip(
float *points,
int n) VTK_OVERRIDE;
133 void DrawPolygon(
float *,
int) VTK_OVERRIDE;
134 void DrawColoredPolygon(
float *points,
int numPoints,
135 unsigned char *colors =
nullptr,
136 int nc_comps = 0) VTK_OVERRIDE;
149 void DrawEllipseWedge(
float x,
float y,
float outRx,
float outRy,
151 float stopAngle) VTK_OVERRIDE;
159 void DrawEllipticArc(
float x,
float y,
float rX,
float rY,
160 float startAngle,
float stopAngle) VTK_OVERRIDE;
177 float bounds[4]) VTK_OVERRIDE;
193 float bounds[4]) VTK_OVERRIDE;
200 void ComputeJustifiedStringBounds(const
char*
string,
float bounds[4]) VTK_OVERRIDE;
206 void DrawMathTextString(
float point[2], const
vtkStdString &
string) VTK_OVERRIDE;
225 void DrawPolyData(
float p[2],
float scale,
vtkPolyData* polyData,
231 void SetColor4(
unsigned char color[4]) VTK_OVERRIDE;
236 virtual
void SetColor(
unsigned char color[3]);
246 void SetPointSize(
float size) VTK_OVERRIDE;
251 void SetLineWidth(
float width) VTK_OVERRIDE;
256 void SetLineType(
int type) VTK_OVERRIDE;
276 void PushMatrix() VTK_OVERRIDE;
281 void PopMatrix() VTK_OVERRIDE;
287 void SetClipping(
int *x) VTK_OVERRIDE;
292 void EnableClipping(
bool enable) VTK_OVERRIDE;
302 void End() VTK_OVERRIDE;
320 void BufferIdModeEnd() VTK_OVERRIDE;
327 bool SetStringRendererToFreeType();
333 bool SetStringRendererToQt();
352 virtual
void ReleaseGraphicsResources(
vtkWindow *window);
364 ~vtkOpenGLContextDevice2D() VTK_OVERRIDE;
373 int GetNumberOfArcIterations(
float rX,
401 CellArrayHelper* PolyDataImpl;
407 vtkOpenGLRenderWindow* RenderWindow;
410 void ReadyLinesCBOProgram();
412 void ReadyLinesBOProgram();
414 void ReadyVCBOProgram();
416 void ReadyVBOProgram();
418 void ReadyVTBOProgram();
420 void ReadySCBOProgram();
422 void ReadySBOProgram();
427 unsigned char *coolors,
int nc,
429 void CoreDrawTriangles(std::
vector<
float> &tverts,
unsigned char* colors = NULL,
432 unsigned short LinePattern;
439 void DrawMarkersGL2PS(
int shape,
bool highlight,
float *points,
int n,
440 unsigned char *colors,
int nc_comps);
441 void DrawCrossMarkersGL2PS(
bool highlight,
float *points,
int n,
442 unsigned char *colors,
int nc_comps);
443 void DrawPlusMarkersGL2PS(
bool highlight,
float *points,
int n,
444 unsigned char *colors,
int nc_comps);
445 void DrawSquareMarkersGL2PS(
bool highlight,
float *points,
int n,
446 unsigned char *colors,
int nc_comps);
447 void DrawCircleMarkersGL2PS(
bool highlight,
float *points,
int n,
448 unsigned char *colors,
int nc_comps);
449 void DrawDiamondMarkersGL2PS(
bool highlight,
float *points,
int n,
450 unsigned char *colors,
int nc_comps);
458 void DrawImageGL2PS(
float p[2],
float scale,
vtkImageData *image);
466 void DrawCircleGL2PS(
float x,
float y,
float rX,
float rY);
467 void DrawWedgeGL2PS(
float x,
float y,
float outRx,
float outRy,
468 float inRx,
float inRy);
474 void AddEllipseToPath(
vtkPath *path,
float x,
float y,
float rx,
float ry,
480 void TransformPath(
vtkPath *path) const;
485 void TransformPoint(
float &x,
float &y) const;
490 void TransformSize(
float &dx,
float &dy) const;
493 vtkOpenGLContextDevice2D(const vtkOpenGLContextDevice2D &) VTK_DELETE_FUNCTION;
494 void operator=(const vtkOpenGLContextDevice2D &) VTK_DELETE_FUNCTION;
504 class vtkMarkerCacheObject
511 return this->Key ==
key;
521 std::list<vtkMarkerCacheObject> MarkerCache;
522 int MaximumMarkerCacheSize;
532 #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()
concrete dataset represents vertices, lines, polygons, and triangle strips
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.
dynamic, self-adjusting array of unsigned char
vtkSetMacro(IgnoreDriverBugs, bool)
When set known driver bugs are ignored during driver feature detection.
vtkWeakPointer< vtkRenderWindow > RenderWindow
2D array of ids, used for picking.
VTKCOMMONCORE_EXPORT bool operator==(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
represent and manipulate 3x3 transformation matrices
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
String class that stores Unicode text.
The ShaderProgram uses one or more Shader objects.