Go to the documentation of this file.
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,
180 float bounds[4]) override;
196 float bounds[4]) override;
203 void ComputeJustifiedStringBounds(const
char*
string,
float bounds[4]) override;
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);
376 int GetNumberOfArcIterations(
float rX,
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);
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,
483 void TransformPoint(
float &x,
float &y) const;
488 void TransformSize(
float &dx,
float &dy) const;
502 class vtkMarkerCacheObject
509 return this->Key ==
key;
519 std::list<vtkMarkerCacheObject> MarkerCache;
520 int MaximumMarkerCacheSize;
530 #endif //vtkOpenGLContextDevice2D_h
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void DrawPoints(float *points, int n, unsigned char *colors=nullptr, int nc_comps=0) override
Draw a series of points - fastest code path due to memory layout of the coordinates.
void DrawPointSprites(vtkImageData *sprite, float *points, int n, unsigned char *colors=nullptr, int nc_comps=0) override
Draw a series of point sprites, images centred at the points supplied.
void DrawLines(float *f, int n, unsigned char *colors=nullptr, int nc_comps=0) override
Draw lines using the points - memory layout is as follows: l1p1,l1p2,l2p1,l2p2...
concrete dataset representing a path defined by Bezier curves.
dynamic, self-adjusting array of unsigned char
base class for classes that render supplied text to an image.
represent and manipulate 3x3 transformation matrices
window superclass for vtkRenderWindow
2D array of ids, used for picking.
void DrawMarkers(int shape, bool highlight, float *points, int n, unsigned char *colors=nullptr, int nc_comps=0) override
Draw a series of markers centered at the points supplied.
Class for drawing 2D primitives using OpenGL 1.1+.
The ShaderProgram uses one or more Shader objects.
topologically and geometrically regular array of data
a simple class to control print indentation
represent and manipulate 4x4 transformation matrices
String class that stores Unicode text.
void DrawPoly(float *f, int n, unsigned char *colors=nullptr, int nc_comps=0) override
Draw a poly line using the points - fastest code path due to memory layout of the coordinates.
VTKCOMMONCORE_EXPORT bool operator==(const vtkUnicodeString &lhs, const vtkUnicodeString &rhs)
abstract specification for Viewports
Abstract class for drawing 2D primitives.
abstract specification for renderers
concrete dataset represents vertices, lines, polygons, and triangle strips
static vtkOpenGLContextDevice2D * New()
Creates a 2D Painter object.
Wrapper around std::string to keep symbols short.