00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00025 #ifndef __vtkContextDevice2D_h
00026 #define __vtkContextDevice2D_h
00027
00028 #include "vtkObject.h"
00029
00030 class vtkWindow;
00031 class vtkViewport;
00032 class vtkStdString;
00033 class vtkTextProperty;
00034 class vtkPoints2D;
00035 class vtkImageData;
00036 class vtkMatrix3x3;
00037 class vtkAbstractContextBufferId;
00038
00039 class VTK_CHARTS_EXPORT vtkContextDevice2D : public vtkObject
00040 {
00041 public:
00042 vtkTypeMacro(vtkContextDevice2D, vtkObject);
00043 virtual void PrintSelf(ostream &os, vtkIndent indent);
00044
00047 virtual void DrawPoly(float *points, int n) = 0;
00048
00051 virtual void DrawPoints(float *points, int n) = 0;
00052
00056 virtual void DrawPointSprites(vtkImageData *sprite, float *points, int n) = 0;
00057
00059 virtual void DrawQuad(float *, int) { ; }
00060
00062
00068 virtual void DrawEllipseWedge(float x, float y, float outRx, float outRy,
00069 float inRx, float inRy, float startAngle,
00070 float stopAngle)=0;
00072
00074
00077 virtual void DrawEllipticArc(float x, float y, float rX, float rY,
00078 float startAngle, float stopAngle)=0;
00080
00081
00083
00084 virtual void DrawString(float *point, vtkTextProperty *tprop,
00085 const vtkStdString &string) = 0;
00087
00089
00094 virtual void ComputeStringBounds(const vtkStdString &string,
00095 vtkTextProperty *tprop,
00096 float bounds[4]) = 0;
00098
00099
00102 virtual void DrawImage(float *, int , vtkImageData *) {;}
00103
00105 virtual void SetColor4(unsigned char *color) = 0;
00106
00108 virtual void SetColor(unsigned char *color) = 0;
00109
00111 virtual void SetPointSize(float size) = 0;
00112
00114 virtual void SetLineWidth(float width) = 0;
00115
00117 virtual void SetLineType(int type) = 0;
00118
00120 virtual int GetWidth() { return this->Geometry[0]; }
00121
00123 virtual int GetHeight() { return this->Geometry[1]; }
00124
00126 virtual void SetMatrix(vtkMatrix3x3 *m) = 0;
00127
00129 virtual void MultiplyMatrix(vtkMatrix3x3 *m) = 0;
00130
00132 virtual void PushMatrix() = 0;
00133
00135 virtual void PopMatrix() = 0;
00136
00139 virtual void SetClipping(int *x) = 0;
00140
00142 virtual void DisableClipping() = 0;
00143
00145 virtual void Begin(vtkViewport*) { }
00146
00148 virtual void End() { }
00149
00152 virtual bool GetBufferIdMode() const;
00153
00157 virtual void BufferIdModeBegin(vtkAbstractContextBufferId *bufferId);
00158
00163 virtual void BufferIdModeEnd();
00164
00165
00166 protected:
00167 vtkContextDevice2D();
00168 virtual ~vtkContextDevice2D();
00169
00171 int Geometry[2];
00172
00173 vtkAbstractContextBufferId *BufferId;
00174
00175 private:
00176 vtkContextDevice2D(const vtkContextDevice2D &);
00177 void operator=(const vtkContextDevice2D &);
00178
00179
00180 };
00181
00182 #endif //__vtkContextDevice2D_h