33 #ifndef vtkOpenGLContextDevice2D_h 34 #define vtkOpenGLContextDevice2D_h 36 #include "vtkRenderingContextOpenGL2Module.h" 43 class vtkOpenGLExtensionManager;
70 void DrawPoly(
float *f,
int n,
unsigned char *colors =
nullptr,
71 int nc_comps = 0)
override;
79 void DrawLines(
float *f,
int n,
unsigned char *colors =
nullptr,
80 int nc_comps = 0)
override;
88 int nc_comps = 0)
override;
97 unsigned char* colors =
nullptr,
int nc_comps = 0)
override;
111 unsigned char *colors =
nullptr,
int nc_comps = 0)
override;
119 vtkSetMacro(MaximumMarkerCacheSize,
int)
120 vtkGetMacro(MaximumMarkerCacheSize,
int)
126 void DrawQuad(
float *
points,
int n) override;
131 void DrawQuadStrip(
float *points,
int n) override;
136 void DrawPolygon(
float *,
int) override;
137 void DrawColoredPolygon(
float *points,
int numPoints,
138 unsigned char *colors =
nullptr,
139 int nc_comps = 0) override;
152 void DrawEllipseWedge(
float x,
float y,
float outRx,
float outRy,
154 float stopAngle) override;
162 void DrawEllipticArc(
float x,
float y,
float rX,
float rY,
163 float startAngle,
float stopAngle) override;
180 float bounds[4]) override;
196 float bounds[4]) override;
203 void ComputeJustifiedStringBounds(const
char*
string,
float bounds[4]) override;
209 void DrawMathTextString(
float point[2], const
vtkStdString &
string) override;
228 void DrawPolyData(
float p[2],
float scale,
vtkPolyData* polyData,
234 void SetColor4(
unsigned char color[4]) override;
239 virtual
void SetColor(
unsigned char color[3]);
249 void SetPointSize(
float size) override;
254 void SetLineWidth(
float width) override;
259 void SetLineType(
int type) override;
279 void PushMatrix() override;
284 void PopMatrix() override;
290 void SetClipping(
int *x) override;
295 void EnableClipping(
bool enable) override;
323 void BufferIdModeEnd() override;
330 bool SetStringRendererToFreeType();
336 bool SetStringRendererToQt();
355 virtual
void ReleaseGraphicsResources(
vtkWindow *window);
367 ~vtkOpenGLContextDevice2D() override;
376 int GetNumberOfArcIterations(
float rX,
399 CellArrayHelper* PolyDataImpl;
405 vtkOpenGLRenderWindow* RenderWindow;
408 void ReadyLinesCBOProgram();
410 void ReadyLinesBOProgram();
412 void ReadyVCBOProgram();
414 void ReadyVBOProgram();
416 void ReadyVTBOProgram();
418 void ReadySCBOProgram();
420 void ReadySBOProgram();
425 unsigned char *coolors,
int nc,
427 void CoreDrawTriangles(std::
vector<
float> &tverts,
unsigned char* colors =
nullptr,
430 unsigned short LinePattern;
437 void DrawMarkersGL2PS(
int shape,
bool highlight,
float *points,
int n,
438 unsigned char *colors,
int nc_comps);
439 void DrawCrossMarkersGL2PS(
bool highlight,
float *points,
int n,
440 unsigned char *colors,
int nc_comps);
441 void DrawPlusMarkersGL2PS(
bool highlight,
float *points,
int n,
442 unsigned char *colors,
int nc_comps);
443 void DrawSquareMarkersGL2PS(
bool highlight,
float *points,
int n,
444 unsigned char *colors,
int nc_comps);
445 void DrawCircleMarkersGL2PS(
bool highlight,
float *points,
int n,
446 unsigned char *colors,
int nc_comps);
447 void DrawDiamondMarkersGL2PS(
bool highlight,
float *points,
int n,
448 unsigned char *colors,
int nc_comps);
456 void DrawImageGL2PS(
float p[2],
float scale,
vtkImageData *image);
464 void DrawCircleGL2PS(
float x,
float y,
float rX,
float rY);
465 void DrawWedgeGL2PS(
float x,
float y,
float outRx,
float outRy,
466 float inRx,
float inRy);
472 void AddEllipseToPath(
vtkPath *path,
float x,
float y,
float rx,
float ry,
478 void TransformPath(
vtkPath *path) const;
483 void TransformPoint(
float &x,
float &y) const;
488 void TransformSize(
float &dx,
float &dy) const;
491 vtkOpenGLContextDevice2D(const vtkOpenGLContextDevice2D &) = delete;
492 void operator=(const vtkOpenGLContextDevice2D &) = delete;
502 class vtkMarkerCacheObject
509 return this->Key ==
key;
519 std::list<vtkMarkerCacheObject> MarkerCache;
520 int MaximumMarkerCacheSize;
530 #endif //vtkOpenGLContextDevice2D_h
Wrapper around std::string to keep symbols short.
represent and manipulate 4x4 transformation matrices
virtual void DrawPointSprites(vtkImageData *sprite, float *points, int n, unsigned char *colors=nullptr, int nc_comps=0)=0
Draw a series of point sprites, images centred at the points supplied.
virtual void DrawPoly(float *points, int n, unsigned char *colors=nullptr, int nc_comps=0)=0
Draw a poly line using the points - fastest code path due to memory layout of the coordinates...
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 DrawPoints(float *points, int n, unsigned char *colors=nullptr, int nc_comps=0)=0
Draw a series of points - fastest code path due to memory layout of the coordinates.
a simple class to control print indentation
virtual void DrawMarkers(int shape, bool highlight, float *points, int n, unsigned char *colors=nullptr, int nc_comps=0)
Draw a series of markers centered at the points supplied.
topologically and geometrically regular array of data
Abstract class for drawing 2D primitives.
virtual void DrawLines(float *f, int n, unsigned char *colors=nullptr, int nc_comps=0)=0
Draw lines using the points - memory layout is as follows: l1p1,l1p2,l2p1,l2p2... ...
dynamic, self-adjusting array of unsigned char
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.