VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
vtkPDFContextDevice2D Class Reference

vtkContextDevice2D implementation for use with vtkPDFExporter. More...

#include <vtkPDFContextDevice2D.h>

Inheritance diagram for vtkPDFContextDevice2D:
[legend]
Collaboration diagram for vtkPDFContextDevice2D:
[legend]

Public Types

typedef vtkContextDevice2D Superclass
 
- Public Types inherited from vtkContextDevice2D
enum  TextureProperty { Nearest = 0x01, Linear = 0x02, Stretch = 0x04, Repeat = 0x08 }
 
typedef vtkObject Superclass
 

Public Member Functions

virtual vtkTypeBool IsA (const char *type)
 Return 1 if this class is the same type of (or a subclass of) the named class. More...
 
vtkPDFContextDevice2DNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
void SetHaruObjects (void *doc, void *page)
 Set the HPDF_Doc and HPDF_Page to use while exporting the scene. More...
 
void SetRenderer (vtkRenderer *)
 
void DrawPoly (float *points, 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. More...
 
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... More...
 
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. More...
 
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. More...
 
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. More...
 
void DrawQuad (float *, int) override
 Draw a quad using the specified number of points. More...
 
void DrawQuadStrip (float *, int) override
 Draw a quad using the specified number of points. More...
 
void DrawPolygon (float *, int) override
 Draw a polygon using the specified number of points. More...
 
void DrawColoredPolygon (float *points, int numPoints, unsigned char *colors=nullptr, int nc_comps=0) override
 Draw a polygon using the specified number of points. More...
 
void DrawEllipseWedge (float x, float y, float outRx, float outRy, float inRx, float inRy, float startAngle, float stopAngle) override
 Draw an elliptic wedge with center at x, y, outer radii outRx, outRy, inner radii inRx, inRy between angles startAngle and stopAngle (expressed in degrees). More...
 
void DrawEllipticArc (float x, float y, float rX, float rY, float startAngle, float stopAngle) override
 Draw an elliptic arc with center at x,y with radii rX and rY between angles startAngle and stopAngle (expressed in degrees). More...
 
void DrawString (float *point, const vtkStdString &string) override
 Draw some text to the screen. More...
 
void ComputeStringBounds (const vtkStdString &string, float bounds[4]) override
 Compute the bounds of the supplied string. More...
 
void DrawString (float *point, const vtkUnicodeString &string) override
 Draw some text to the screen. More...
 
void ComputeStringBounds (const vtkUnicodeString &string, float bounds[4]) override
 Compute the bounds of the supplied string. More...
 
void ComputeJustifiedStringBounds (const char *string, float bounds[4]) override
 Compute the bounds of the supplied string while taking into account the justification of the currently applied text property. More...
 
void DrawMathTextString (float *point, const vtkStdString &str) override
 Draw text using MathText markup for mathematical equations. More...
 
void DrawImage (float p[2], float scale, vtkImageData *image) override
 Draw the supplied image at the given x, y (p[0], p[1]) (bottom corner), scaled by scale (1.0 would match the image). More...
 
void DrawImage (const vtkRectf &pos, vtkImageData *image) override
 Draw the supplied image at the given position. More...
 
void SetColor4 (unsigned char color[4]) override
 Set the color for the device using unsigned char of length 4, RGBA. More...
 
void SetTexture (vtkImageData *image, int properties) override
 Set the texture for the device, it is used to fill the polygons. More...
 
void SetPointSize (float size) override
 Set the point size for glyphs/sprites. More...
 
void SetLineWidth (float width) override
 Set the line width. More...
 
void DrawPolyData (float p[2], float scale, vtkPolyData *polyData, vtkUnsignedCharArray *colors, int scalarMode) override
 Draw the supplied PolyData at the given x, y (p[0], p[1]) (bottom corner), scaled by scale (1.0 would match the actual dataset). More...
 
void SetLineType (int type) override
 Set the line type type (using anonymous enum in vtkPen). More...
 
void SetMatrix (vtkMatrix3x3 *m) override
 Set the model view matrix for the display. More...
 
void GetMatrix (vtkMatrix3x3 *m) override
 Set the model view matrix for the display. More...
 
void MultiplyMatrix (vtkMatrix3x3 *m) override
 Multiply the current model view matrix by the supplied one. More...
 
void PushMatrix () override
 Push the current matrix onto the stack. More...
 
void PopMatrix () override
 Pop the current matrix off of the stack. More...
 
void SetClipping (int *x) override
 Supply an int array of length 4 with x1, y1, width, height specifying clipping region for the device in pixels. More...
 
void EnableClipping (bool enable) override
 Enable or disable the clipping of the scene. More...
 
- Public Member Functions inherited from vtkContextDevice2D
vtkContextDevice2DNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent) override
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual bool MathTextIsSupported ()
 Return true if MathText rendering available on this device. More...
 
virtual void ApplyPen (vtkPen *pen)
 Apply the supplied pen which controls the outlines of shapes, as well as lines, points and related primitives. More...
 
virtual void ApplyBrush (vtkBrush *brush)
 Apply the supplied brush which controls the outlines of shapes, as well as lines, points and related primitives. More...
 
virtual void ApplyTextProp (vtkTextProperty *prop)
 Apply the supplied text property which controls how text is rendered. More...
 
virtual int GetWidth ()
 Get the width of the device in pixels. More...
 
virtual int GetHeight ()
 Get the width of the device in pixels. More...
 
virtual void DisableClipping ()
 Disable clipping of the display. More...
 
virtual void Begin (vtkViewport *)
 Begin drawing, pass in the viewport to set up the view. More...
 
virtual void End ()
 End drawing, clean up the view. More...
 
virtual bool GetBufferIdMode () const
 Tell if the device context is in BufferId creation mode. More...
 
virtual void BufferIdModeBegin (vtkAbstractContextBufferId *bufferId)
 Start BufferId creation Mode. More...
 
virtual void BufferIdModeEnd ()
 Finalize BufferId creation Mode. More...
 
virtual void SetViewportSize (const vtkVector2i &size)
 
virtual vtkVector2i GetViewportSize ()
 
virtual void SetViewportRect (const vtkRecti &rect)
 
virtual vtkRecti GetViewportRect ()
 
virtual vtkPenGetPen ()
 Get the pen which controls the outlines of shapes, as well as lines, points and related primitives. More...
 
virtual vtkBrushGetBrush ()
 Get the pen which controls the outlines of shapes as well as lines, points and related primitives. More...
 
virtual vtkTextPropertyGetTextProp ()
 Get the text properties object for the vtkContext2D. More...
 
- Public Member Functions inherited from vtkObject
 vtkBaseTypeMacro (vtkObject, vtkObjectBase)
 
virtual void DebugOn ()
 Turn debugging output on. More...
 
virtual void DebugOff ()
 Turn debugging output off. More...
 
bool GetDebug ()
 Get the value of the debug flag. More...
 
void SetDebug (bool debugFlag)
 Set the value of the debug flag. More...
 
virtual void Modified ()
 Update the modification time for this object. More...
 
virtual vtkMTimeType GetMTime ()
 Return this object's modified time. More...
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
vtkTypeBool HasObserver (unsigned long event)
 
vtkTypeBool HasObserver (const char *event)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkCommandGetCommand (unsigned long tag)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObserver (vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
void RemoveObservers (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (unsigned long event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
vtkTypeBool HasObserver (const char *event, vtkCommand *)
 Allow people to add/remove/invoke observers (callbacks) to any VTK object. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Overloads to AddObserver that allow developers to add class member functions as callbacks for events. More...
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 Allow user to set the AbortFlagOn() with the return value of the callback method. More...
 
int InvokeEvent (unsigned long event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
int InvokeEvent (const char *event, void *callData)
 This method invokes an event and return whether the event was aborted or not. More...
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 Return the class name as a string. More...
 
virtual void Delete ()
 Delete a VTK object. More...
 
virtual void FastDelete ()
 Delete a reference to this object. More...
 
void InitializeObjectBase ()
 
void Print (ostream &os)
 Print an object to an ostream. More...
 
virtual void Register (vtkObjectBase *o)
 Increase the reference count (mark as used by another object). More...
 
virtual void UnRegister (vtkObjectBase *o)
 Decrease the reference count (release by another object). More...
 
int GetReferenceCount ()
 Return the current reference count of this object. More...
 
void SetReferenceCount (int)
 Sets the reference count. More...
 
void PrintRevisions (ostream &)
 Legacy. More...
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 Methods invoked by print to print information about the object including superclasses. More...
 

Static Public Member Functions

static vtkPDFContextDevice2DNew ()
 
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkPDFContextDevice2DSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkContextDevice2D
static vtkTypeBool IsTypeOf (const char *type)
 
static vtkContextDevice2DSafeDownCast (vtkObjectBase *o)
 
static vtkContextDevice2DNew ()
 
- Static Public Member Functions inherited from vtkObject
static vtkObjectNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 
static void BreakOnError ()
 This method is called when vtkErrorMacro executes. More...
 
static void SetGlobalWarningDisplay (int val)
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOn ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static void GlobalWarningDisplayOff ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
static int GetGlobalWarningDisplay ()
 This is a global flag that controls whether any debug, warning or error messages are displayed. More...
 
- Static Public Member Functions inherited from vtkObjectBase
static vtkTypeBool IsTypeOf (const char *name)
 Return 1 if this class type is the same type of (or a subclass of) the named class. More...
 
static vtkObjectBaseNew ()
 Create an object with Debug turned off, modified time initialized to zero, and reference counting on. More...
 

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 
 vtkPDFContextDevice2D ()
 
 ~vtkPDFContextDevice2D () override
 
void PushGraphicsState ()
 
void PopGraphicsState ()
 
void ApplyPenState ()
 
void ApplyStrokeColor (unsigned char *color, int numComps)
 
void ApplyLineWidth (float width)
 
void ApplyLineType (int type)
 
void Stroke ()
 
void ApplyPenStateAsFill ()
 
void ApplyBrushState ()
 
void ApplyTextPropertyState ()
 
void ApplyFillColor (unsigned char *color, int numComps)
 
void ApplyFillAlpha (unsigned char alpha)
 
void Fill (bool stroke=false)
 
void FillEvenOdd (bool stroke=false)
 
void BeginClipPathForTexture ()
 
void RegisterTexturePoints (float *data, int numPoints)
 
void FillTexture ()
 
vtkImageDataPrepareImageData (vtkImageData *in)
 
void DrawEllipticArcSegments (float x, float y, float rX, float rY, float startAngle, float stopAngle, bool startPath)
 
int GetNumberOfArcIterations (float rX, float rY, float startAngle, float stopAngle)
 
void DrawCrossMarkers (bool highlight, float *points, int n, unsigned char *colors, int nc_comps)
 
void DrawPlusMarkers (bool highlight, float *points, int n, unsigned char *colors, int nc_comps)
 
void DrawSquareMarkers (bool highlight, float *points, int n, unsigned char *colors, int nc_comps)
 
void DrawCircleMarkers (bool highlight, float *points, int n, unsigned char *colors, int nc_comps)
 
void DrawDiamondMarkers (bool highlight, float *points, int n, unsigned char *colors, int nc_comps)
 
void DrawPath (vtkPath *path, float x, float y)
 
void ApplyTransform ()
 
vtkVector2f GetUnscaledPenWidth ()
 
- Protected Member Functions inherited from vtkContextDevice2D
 vtkContextDevice2D ()
 
 ~vtkContextDevice2D () override
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
 ~vtkObject () override
 
void RegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void UnRegisterInternal (vtkObjectBase *, vtkTypeBool check) override
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=nullptr)
 These methods allow a command to exclusively grab all events. More...
 
void InternalReleaseFocus ()
 These methods allow a command to exclusively grab all events. More...
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Static Protected Member Functions

static void Matrix3ToMatrix4 (vtkMatrix3x3 *mat3, double mat4[16])
 
static void Matrix4ToMatrix3 (double mat4[16], vtkMatrix3x3 *mat3)
 
static void Matrix4ToMatrix3 (double mat4[16], double mat3[9])
 
static void Matrix4ToHPDFTransform (const double mat4[16], float hpdfMat[6])
 
static void Matrix3ToHPDFTransform (const double mat4[9], float hpdfMat[6])
 
static void HPDFTransformToMatrix3 (float a, float b, float c, float d, float x, float y, double mat3[9])
 

Protected Attributes

Details * Impl
 
vtkNew< vtkTransformMatrix
 
vtkRendererRenderer
 
float PointSize
 
float ClipBox [4]
 
bool IsInTexturedFill
 
float TextureBounds [4]
 
- Protected Attributes inherited from vtkContextDevice2D
int Geometry [2]
 Store the width and height of the device in pixels. More...
 
vtkVector2i ViewportSize
 Store the size of the total viewport. More...
 
vtkRecti ViewportRect
 Store our origin and size in the total viewport. More...
 
vtkAbstractContextBufferIdBufferId
 
vtkPenPen
 
vtkBrushBrush
 
vtkTextPropertyTextProp
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

Detailed Description

vtkContextDevice2D implementation for use with vtkPDFExporter.

Quirks:

Definition at line 37 of file vtkPDFContextDevice2D.h.

Member Typedef Documentation

Definition at line 41 of file vtkPDFContextDevice2D.h.

Constructor & Destructor Documentation

vtkPDFContextDevice2D::vtkPDFContextDevice2D ( )
protected
vtkPDFContextDevice2D::~vtkPDFContextDevice2D ( )
overrideprotected

Member Function Documentation

static vtkPDFContextDevice2D* vtkPDFContextDevice2D::New ( )
static
static vtkTypeBool vtkPDFContextDevice2D::IsTypeOf ( const char *  type)
static
virtual vtkTypeBool vtkPDFContextDevice2D::IsA ( const char *  name)
virtual

Return 1 if this class is the same type of (or a subclass of) the named class.

Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkContextDevice2D.

static vtkPDFContextDevice2D* vtkPDFContextDevice2D::SafeDownCast ( vtkObjectBase o)
static
virtual vtkObjectBase* vtkPDFContextDevice2D::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkContextDevice2D.

vtkPDFContextDevice2D* vtkPDFContextDevice2D::NewInstance ( ) const
void vtkPDFContextDevice2D::PrintSelf ( ostream &  os,
vtkIndent  indent 
)
overridevirtual

Methods invoked by print to print information about the object including superclasses.

Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkObject.

void vtkPDFContextDevice2D::SetHaruObjects ( void *  doc,
void *  page 
)

Set the HPDF_Doc and HPDF_Page to use while exporting the scene.

The type is void* to keep the libharu opaque types from leaking into headers. This function expects HPDF_Document* and HPDF_Page* as the arguments.

void vtkPDFContextDevice2D::SetRenderer ( vtkRenderer )
void vtkPDFContextDevice2D::DrawPoly ( float points,
int  n,
unsigned char *  colors = nullptr,
int  nc_comps = 0 
)
overridevirtual

Draw a poly line using the points - fastest code path due to memory layout of the coordinates.

The line will be colored by the colors array, which must be have nc_comps components (defining a single color).

See also
DrawLines()

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawLines ( float f,
int  n,
unsigned char *  colors = nullptr,
int  nc_comps = 0 
)
overridevirtual

Draw lines using the points - memory layout is as follows: l1p1,l1p2,l2p1,l2p2...

The lines will be colored by colors array which has nc_comps components (defining a single color).

See also
DrawPoly()

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawPoints ( float points,
int  n,
unsigned char *  colors = nullptr,
int  nc_comps = 0 
)
overridevirtual

Draw a series of points - fastest code path due to memory layout of the coordinates.

The colors and nc_comps are optional - color array.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawPointSprites ( vtkImageData sprite,
float points,
int  n,
unsigned char *  colors = nullptr,
int  nc_comps = 0 
)
overridevirtual

Draw a series of point sprites, images centred at the points supplied.

The supplied vtkImageData is the sprite to be drawn, only squares will be drawn and the size is set using SetPointSize.

Parameters
colorsis an optional array of colors.
nc_compsis the number of components for the color.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawMarkers ( int  shape,
bool  highlight,
float points,
int  n,
unsigned char *  colors = nullptr,
int  nc_comps = 0 
)
overridevirtual

Draw a series of markers centered at the points supplied.

The shape argument controls the marker shape, and can be one of

  • VTK_MARKER_CROSS
  • VTK_MARKER_PLUS
  • VTK_MARKER_SQUARE
  • VTK_MARKER_CIRCLE
  • VTK_MARKER_DIAMOND
    Parameters
    colorsis an optional array of colors.
    nc_compsis the number of components for the color.

Reimplemented from vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawQuad ( float ,
int   
)
overridevirtual

Draw a quad using the specified number of points.

Reimplemented from vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawQuadStrip ( float ,
int   
)
overridevirtual

Draw a quad using the specified number of points.

Reimplemented from vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawPolygon ( float p,
int  n 
)
overridevirtual

Draw a polygon using the specified number of points.

Reimplemented from vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawColoredPolygon ( float points,
int  numPoints,
unsigned char *  colors = nullptr,
int  nc_comps = 0 
)
overridevirtual

Draw a polygon using the specified number of points.

Reimplemented from vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawEllipseWedge ( float  x,
float  y,
float  outRx,
float  outRy,
float  inRx,
float  inRy,
float  startAngle,
float  stopAngle 
)
overridevirtual

Draw an elliptic wedge with center at x, y, outer radii outRx, outRy, inner radii inRx, inRy between angles startAngle and stopAngle (expressed in degrees).

Precondition
positive_outRx: outRx>=0
positive_outRy: outRy>=0
positive_inRx: inRx>=0
positive_inRy: inRy>=0
ordered_rx: inRx<=outRx
ordered_ry: inRy<=outRy

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawEllipticArc ( float  x,
float  y,
float  rX,
float  rY,
float  startAngle,
float  stopAngle 
)
overridevirtual

Draw an elliptic arc with center at x,y with radii rX and rY between angles startAngle and stopAngle (expressed in degrees).

Precondition
positive_rX: rX>=0
positive_rY: rY>=0

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawString ( float point,
const vtkStdString string 
)
overridevirtual

Draw some text to the screen.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::ComputeStringBounds ( const vtkStdString string,
float  bounds[4] 
)
overridevirtual

Compute the bounds of the supplied string.

The bounds will be copied to the supplied bounds variable, the first two elements are the bottom corner of the string, and the second two elements are the width and height of the bounding box. NOTE: This function does not take account of the text rotation or justification.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawString ( float point,
const vtkUnicodeString string 
)
overridevirtual

Draw some text to the screen.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::ComputeStringBounds ( const vtkUnicodeString string,
float  bounds[4] 
)
overridevirtual

Compute the bounds of the supplied string.

The bounds will be copied to the supplied bounds variable, the first two elements are the bottom corner of the string, and the second two elements are the width and height of the bounding box. NOTE: This function does not take account of the text rotation or justification.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::ComputeJustifiedStringBounds ( const char *  string,
float  bounds[4] 
)
overridevirtual

Compute the bounds of the supplied string while taking into account the justification of the currently applied text property.

Simple rotations (0, 90, 180, 270) are also correctly taken into account.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawMathTextString ( float point,
const vtkStdString string 
)
overridevirtual

Draw text using MathText markup for mathematical equations.

See http://matplotlib.sourceforge.net/users/mathtext.html for more information.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawImage ( float  p[2],
float  scale,
vtkImageData image 
)
overridevirtual

Draw the supplied image at the given x, y (p[0], p[1]) (bottom corner), scaled by scale (1.0 would match the image).

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawImage ( const vtkRectf pos,
vtkImageData image 
)
overridevirtual

Draw the supplied image at the given position.

The origin, width, and height are specified by the supplied vtkRectf variable pos. The image will be drawn scaled to that size.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::SetColor4 ( unsigned char  color[4])
overridevirtual

Set the color for the device using unsigned char of length 4, RGBA.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::SetTexture ( vtkImageData image,
int  properties 
)
overridevirtual

Set the texture for the device, it is used to fill the polygons.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::SetPointSize ( float  size)
overridevirtual

Set the point size for glyphs/sprites.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::SetLineWidth ( float  width)
overridevirtual

Set the line width.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::DrawPolyData ( float  p[2],
float  scale,
vtkPolyData polyData,
vtkUnsignedCharArray colors,
int  scalarMode 
)
overridevirtual

Draw the supplied PolyData at the given x, y (p[0], p[1]) (bottom corner), scaled by scale (1.0 would match the actual dataset).

Only lines and polys are rendered. Only the x/y coordinates of the polydata are used.

Parameters
pOffset to apply to polydata.
scaleIsotropic scale for polydata. Applied after offset.
polyDataDraw lines and polys from this dataset.
colorsRGBA for points or cells, depending on value of scalarMode. Must not be NULL.
scalarModeMust be either VTK_SCALAR_MODE_USE_POINT_DATA or VTK_SCALAR_MODE_USE_CELL_DATA.

The base implementation breaks the polydata apart and renders each polygon individually using the device API. Subclasses should override this method with a batch-drawing implementation if performance is a concern.

Reimplemented from vtkContextDevice2D.

void vtkPDFContextDevice2D::SetLineType ( int  type)
overridevirtual

Set the line type type (using anonymous enum in vtkPen).

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::SetMatrix ( vtkMatrix3x3 m)
overridevirtual

Set the model view matrix for the display.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::GetMatrix ( vtkMatrix3x3 m)
overridevirtual

Set the model view matrix for the display.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::MultiplyMatrix ( vtkMatrix3x3 m)
overridevirtual

Multiply the current model view matrix by the supplied one.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::PushMatrix ( )
overridevirtual

Push the current matrix onto the stack.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::PopMatrix ( )
overridevirtual

Pop the current matrix off of the stack.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::SetClipping ( int x)
overridevirtual

Supply an int array of length 4 with x1, y1, width, height specifying clipping region for the device in pixels.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::EnableClipping ( bool  enable)
overridevirtual

Enable or disable the clipping of the scene.

Implements vtkContextDevice2D.

void vtkPDFContextDevice2D::PushGraphicsState ( )
protected
void vtkPDFContextDevice2D::PopGraphicsState ( )
protected
void vtkPDFContextDevice2D::ApplyPenState ( )
protected
void vtkPDFContextDevice2D::ApplyStrokeColor ( unsigned char *  color,
int  numComps 
)
protected
void vtkPDFContextDevice2D::ApplyLineWidth ( float  width)
protected
void vtkPDFContextDevice2D::ApplyLineType ( int  type)
protected
void vtkPDFContextDevice2D::Stroke ( )
protected
void vtkPDFContextDevice2D::ApplyPenStateAsFill ( )
protected
void vtkPDFContextDevice2D::ApplyBrushState ( )
protected
void vtkPDFContextDevice2D::ApplyTextPropertyState ( )
protected
void vtkPDFContextDevice2D::ApplyFillColor ( unsigned char *  color,
int  numComps 
)
protected
void vtkPDFContextDevice2D::ApplyFillAlpha ( unsigned char  alpha)
protected
void vtkPDFContextDevice2D::Fill ( bool  stroke = false)
protected
void vtkPDFContextDevice2D::FillEvenOdd ( bool  stroke = false)
protected
void vtkPDFContextDevice2D::BeginClipPathForTexture ( )
protected
void vtkPDFContextDevice2D::RegisterTexturePoints ( float data,
int  numPoints 
)
protected
void vtkPDFContextDevice2D::FillTexture ( )
protected
vtkImageData* vtkPDFContextDevice2D::PrepareImageData ( vtkImageData in)
protected
void vtkPDFContextDevice2D::DrawEllipticArcSegments ( float  x,
float  y,
float  rX,
float  rY,
float  startAngle,
float  stopAngle,
bool  startPath 
)
protected
int vtkPDFContextDevice2D::GetNumberOfArcIterations ( float  rX,
float  rY,
float  startAngle,
float  stopAngle 
)
protected
void vtkPDFContextDevice2D::DrawCrossMarkers ( bool  highlight,
float points,
int  n,
unsigned char *  colors,
int  nc_comps 
)
protected
void vtkPDFContextDevice2D::DrawPlusMarkers ( bool  highlight,
float points,
int  n,
unsigned char *  colors,
int  nc_comps 
)
protected
void vtkPDFContextDevice2D::DrawSquareMarkers ( bool  highlight,
float points,
int  n,
unsigned char *  colors,
int  nc_comps 
)
protected
void vtkPDFContextDevice2D::DrawCircleMarkers ( bool  highlight,
float points,
int  n,
unsigned char *  colors,
int  nc_comps 
)
protected
void vtkPDFContextDevice2D::DrawDiamondMarkers ( bool  highlight,
float points,
int  n,
unsigned char *  colors,
int  nc_comps 
)
protected
void vtkPDFContextDevice2D::DrawPath ( vtkPath path,
float  x,
float  y 
)
protected
void vtkPDFContextDevice2D::ApplyTransform ( )
protected
vtkVector2f vtkPDFContextDevice2D::GetUnscaledPenWidth ( )
protected
static void vtkPDFContextDevice2D::Matrix3ToMatrix4 ( vtkMatrix3x3 mat3,
double  mat4[16] 
)
staticprotected
static void vtkPDFContextDevice2D::Matrix4ToMatrix3 ( double  mat4[16],
vtkMatrix3x3 mat3 
)
staticprotected
static void vtkPDFContextDevice2D::Matrix4ToMatrix3 ( double  mat4[16],
double  mat3[9] 
)
staticprotected
static void vtkPDFContextDevice2D::Matrix4ToHPDFTransform ( const double  mat4[16],
float  hpdfMat[6] 
)
staticprotected
static void vtkPDFContextDevice2D::Matrix3ToHPDFTransform ( const double  mat4[9],
float  hpdfMat[6] 
)
staticprotected
static void vtkPDFContextDevice2D::HPDFTransformToMatrix3 ( float  a,
float  b,
float  c,
float  d,
float  x,
float  y,
double  mat3[9] 
)
staticprotected

Member Data Documentation

Details* vtkPDFContextDevice2D::Impl
protected

Definition at line 172 of file vtkPDFContextDevice2D.h.

vtkNew<vtkTransform> vtkPDFContextDevice2D::Matrix
protected

Definition at line 176 of file vtkPDFContextDevice2D.h.

vtkRenderer* vtkPDFContextDevice2D::Renderer
protected

Definition at line 178 of file vtkPDFContextDevice2D.h.

float vtkPDFContextDevice2D::PointSize
protected

Definition at line 179 of file vtkPDFContextDevice2D.h.

float vtkPDFContextDevice2D::ClipBox[4]
protected

Definition at line 180 of file vtkPDFContextDevice2D.h.

bool vtkPDFContextDevice2D::IsInTexturedFill
protected

Definition at line 182 of file vtkPDFContextDevice2D.h.

float vtkPDFContextDevice2D::TextureBounds[4]
protected

Definition at line 183 of file vtkPDFContextDevice2D.h.


The documentation for this class was generated from the following file: