ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
vtkBoundingRectContextDevice2D Class Reference

#include <vtkBoundingRectContextDevice2D.h>

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

Public Member Functions

 vtkTypeMacro (vtkBoundingRectContextDevice2D, vtkContextDevice2D) void PrintSelf(ostream &os
 
 vtkSetObjectMacro (DelegateDevice, vtkContextDevice2D)
 
 vtkGetObjectMacro (DelegateDevice, vtkContextDevice2D)
 
void Reset ()
 
vtkRectf GetBoundingRect ()
 
void DrawString (float *point, const vtkStdString &string) override
 
void DrawMathTextString (float *point, const vtkStdString &string) override
 
void DrawImage (float p[2], float scale, vtkImageData *image) override
 
void DrawImage (const vtkRectf &pos, vtkImageData *image) override
 
void DrawPolyData (float vtkNotUsed(p)[2], float vtkNotUsed(scale), vtkPolyData *vtkNotUsed(polyData), vtkUnsignedCharArray *vtkNotUsed(colors), int vtkNotUsed(scalarMode)) override
 
void SetColor4 (unsigned char color[4]) override
 
void SetTexture (vtkImageData *image, int properties) override
 
void SetPointSize (float size) override
 
void SetLineWidth (float width) override
 
void SetLineType (int type) override
 
void SetMatrix (vtkMatrix3x3 *m) override
 
void GetMatrix (vtkMatrix3x3 *m) override
 
void MultiplyMatrix (vtkMatrix3x3 *m) override
 
void PushMatrix () override
 
void PopMatrix () override
 
void EnableClipping (bool enable) override
 
void SetClipping (int *x) override
 
void ApplyPen (vtkPen *pen) override
 
vtkPen * GetPen () override
 
void ApplyBrush (vtkBrush *brush) override
 
vtkBrush * GetBrush () override
 
void ApplyTextProp (vtkTextProperty *prop) override
 
vtkTextProperty * GetTextProp () override
 
void DrawPoly (float *points, int n, unsigned char *colors=0, int nc_comps=0) override
 
void DrawLines (float *f, int n, unsigned char *colors=0, int nc_comps=0) override
 
void DrawPoints (float *points, int n, unsigned char *colors=0, int nc_comps=0) override
 
void DrawPointSprites (vtkImageData *sprite, float *points, int n, unsigned char *colors=0, int nc_comps=0) override
 
void DrawMarkers (int shape, bool highlight, float *points, int n, unsigned char *colors=0, int nc_comps=0) override
 
void DrawEllipseWedge (float x, float y, float outRx, float outRy, float inRx, float inRy, float startAngle, float stopAngle) override
 
void DrawEllipticArc (float x, float y, float rX, float rY, float startAngle, float stopAngle) override
 
void ComputeStringBounds (const vtkStdString &string, float bounds[4]) override
 
void ComputeJustifiedStringBounds (const char *string, float bounds[4]) override
 
void Begin (vtkViewport *) override
 
void End () override
 
bool GetBufferIdMode () const override
 
void BufferIdModeBegin (vtkAbstractContextBufferId *bufferId) override
 
void BufferIdModeEnd () override
 

Static Public Member Functions

static vtkBoundingRectContextDevice2D * New ()
 
static vtkRectf GetBoundingRect (vtkAbstractContextItem *item, vtkViewport *viewport)
 

Public Attributes

vtkIndent indent override
 

Protected Member Functions

 vtkBoundingRectContextDevice2D ()
 
 ~vtkBoundingRectContextDevice2D () override
 
void AddPoint (float x, float y)
 
void AddPoint (float point[2])
 
void AddRect (const vtkRectf &rect)
 

Protected Attributes

bool Initialized
 
vtkRectf BoundingRect
 
vtkContextDevice2D * DelegateDevice
 

Constructor & Destructor Documentation

◆ vtkBoundingRectContextDevice2D()

vtkBoundingRectContextDevice2D::vtkBoundingRectContextDevice2D ( )
protected

◆ ~vtkBoundingRectContextDevice2D()

vtkBoundingRectContextDevice2D::~vtkBoundingRectContextDevice2D ( )
overrideprotected

References DelegateDevice, and NULL.

Member Function Documentation

◆ AddPoint() [1/2]

void vtkBoundingRectContextDevice2D::AddPoint ( float  point[2])
protected

References BoundingRect, and Initialized.

◆ AddPoint() [2/2]

void vtkBoundingRectContextDevice2D::AddPoint ( float  x,
float  y 
)
protected

Add a point to the cumulative bounding rect.

References x, and y.

Referenced by DrawEllipseWedge(), DrawEllipticArc(), DrawImage(), DrawLines(), DrawMathTextString(), DrawPoints(), DrawPointSprites(), and DrawString().

◆ AddRect()

void vtkBoundingRectContextDevice2D::AddRect ( const vtkRectf &  rect)
protected

Add a rect to the cumulative bounding rect.

References BoundingRect, and Initialized.

◆ ApplyBrush()

void vtkBoundingRectContextDevice2D::ApplyBrush ( vtkBrush *  brush)
override

Forward the brush to the delegate device.

References DelegateDevice.

◆ ApplyPen()

void vtkBoundingRectContextDevice2D::ApplyPen ( vtkPen *  pen)
override

Forward the pen to the delegate device.

References DelegateDevice.

◆ ApplyTextProp()

void vtkBoundingRectContextDevice2D::ApplyTextProp ( vtkTextProperty *  prop)
override

Forward the text property to the delegate device.

References DelegateDevice.

◆ Begin()

void vtkBoundingRectContextDevice2D::Begin ( vtkViewport *  viewport)
override

Call before drawing to this device.

References DelegateDevice.

◆ BufferIdModeBegin()

void vtkBoundingRectContextDevice2D::BufferIdModeBegin ( vtkAbstractContextBufferId *  bufferId)
override

Begin ID buffering mode.

References DelegateDevice.

◆ BufferIdModeEnd()

void vtkBoundingRectContextDevice2D::BufferIdModeEnd ( )
override

End ID buffering mode.

References DelegateDevice.

◆ ComputeJustifiedStringBounds()

void vtkBoundingRectContextDevice2D::ComputeJustifiedStringBounds ( const char *  string,
float  bounds[4] 
)
override

Forward string bounds calculation to the delegate device.

References DelegateDevice.

◆ ComputeStringBounds()

void vtkBoundingRectContextDevice2D::ComputeStringBounds ( const vtkStdString &  string,
float  bounds[4] 
)
override

Forward string bounds calculation to the delegate device.

References DelegateDevice.

◆ DrawEllipseWedge()

void vtkBoundingRectContextDevice2D::DrawEllipseWedge ( float  x,
float  y,
float  outRx,
float  outRy,
float  inRx,
float  inRy,
float  startAngle,
float  stopAngle 
)
override

Expand bounding rect to contain the ellipse.

References a, AddPoint(), x, and y.

◆ DrawEllipticArc()

void vtkBoundingRectContextDevice2D::DrawEllipticArc ( float  x,
float  y,
float  rX,
float  rY,
float  startAngle,
float  stopAngle 
)
override

Expand bounding rect to contain the elliptic arc.

References a, AddPoint(), x, and y.

◆ DrawImage() [1/2]

void vtkBoundingRectContextDevice2D::DrawImage ( const vtkRectf &  pos,
vtkImageData *  image 
)
override

Expand bounding box to contain the image's bounding box.

◆ DrawImage() [2/2]

void vtkBoundingRectContextDevice2D::DrawImage ( float  p[2],
float  scale,
vtkImageData *  image 
)
override

Expand bounding box to contain the image's bounding box.

References AddPoint(), and image.

◆ DrawLines()

void vtkBoundingRectContextDevice2D::DrawLines ( float *  f,
int  n,
unsigned char *  colors = 0,
int  nc_comps = 0 
)
override

Expand bounding rect to contain the given lines.

References AddPoint(), and NULL.

Referenced by DrawPoly().

◆ DrawMarkers()

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

Expand bounding rect to contain the markers.

References colors, DrawPointSprites(), NULL, and points.

◆ DrawMathTextString()

void vtkBoundingRectContextDevice2D::DrawMathTextString ( float *  point,
const vtkStdString &  string 
)
override

Expand bounding box to contain the string's bounding box.

References AddPoint(), and DelegateDevice.

◆ DrawPoints()

void vtkBoundingRectContextDevice2D::DrawPoints ( float *  points,
int  n,
unsigned char *  colors = 0,
int  nc_comps = 0 
)
override

Expand bounding rect to contain the given points.

References AddPoint(), NULL, and points.

◆ DrawPointSprites()

void vtkBoundingRectContextDevice2D::DrawPointSprites ( vtkImageData *  sprite,
float *  points,
int  n,
unsigned char *  colors = 0,
int  nc_comps = 0 
)
override

Expand bounding rect to contain the point sprites.

References AddPoint(), DelegateDevice, NULL, points, x, and y.

Referenced by DrawMarkers().

◆ DrawPoly()

void vtkBoundingRectContextDevice2D::DrawPoly ( float *  points,
int  n,
unsigned char *  colors = 0,
int  nc_comps = 0 
)
override

Expand bounding box to contain the given polygon.

References colors, and DrawLines().

◆ DrawPolyData()

void vtkBoundingRectContextDevice2D::DrawPolyData ( float   vtkNotUsed(p)[2],
float   vtkNotUsedscale,
vtkPolyData *  vtkNotUsedpolyData,
vtkUnsignedCharArray *  vtkNotUsedcolors,
int   vtkNotUsedscalarMode 
)
inlineoverride

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).

Warning
Not currently implemented.

◆ DrawString()

void vtkBoundingRectContextDevice2D::DrawString ( float *  point,
const vtkStdString &  string 
)
override

Expand bounding box to contain the string's bounding box.

References AddPoint(), and DelegateDevice.

◆ EnableClipping()

void vtkBoundingRectContextDevice2D::EnableClipping ( bool  enable)
override

Implement pure virtual member function. Does nothing.

References DelegateDevice.

◆ End()

void vtkBoundingRectContextDevice2D::End ( )
override

Call after drawing to this device.

References DelegateDevice.

◆ GetBoundingRect() [1/2]

vtkRectf vtkBoundingRectContextDevice2D::GetBoundingRect ( )

Get the bounding rect that contains all the primitives rendered by the device so far.

References BoundingRect.

Referenced by vtkContext2DScalarBarActor::GetBoundingRect().

◆ GetBoundingRect() [2/2]

vtkRectf vtkBoundingRectContextDevice2D::GetBoundingRect ( vtkAbstractContextItem *  item,
vtkViewport *  viewport 
)
static

Get the bounding rect that contains the given vtkAbstractContextItem.

References context.

◆ GetBrush()

vtkBrush * vtkBoundingRectContextDevice2D::GetBrush ( )
override

Get the brush from the delegate device.

References DelegateDevice, and NULL.

◆ GetBufferIdMode()

bool vtkBoundingRectContextDevice2D::GetBufferIdMode ( ) const
override

Get value from delegate device.

References DelegateDevice.

◆ GetMatrix()

void vtkBoundingRectContextDevice2D::GetMatrix ( vtkMatrix3x3 *  m)
override

Get current matrix from delegate device.

References DelegateDevice.

◆ GetPen()

vtkPen * vtkBoundingRectContextDevice2D::GetPen ( )
override

Get the pen from the delegate device.

References DelegateDevice, and NULL.

◆ GetTextProp()

vtkTextProperty * vtkBoundingRectContextDevice2D::GetTextProp ( )
override

Get the text property from the delegate device.

References DelegateDevice, and NULL.

◆ MultiplyMatrix()

void vtkBoundingRectContextDevice2D::MultiplyMatrix ( vtkMatrix3x3 *  m)
override

Multiply the current matrix in the delegate device by this one.

References DelegateDevice.

◆ New()

static vtkBoundingRectContextDevice2D* vtkBoundingRectContextDevice2D::New ( )
static

◆ PopMatrix()

void vtkBoundingRectContextDevice2D::PopMatrix ( )
override

Pope matrix from the delegate device.

References DelegateDevice.

◆ PushMatrix()

void vtkBoundingRectContextDevice2D::PushMatrix ( )
override

Push matrix in the delegate device.

References DelegateDevice.

◆ Reset()

void vtkBoundingRectContextDevice2D::Reset ( )

reset the bounding box.

References BoundingRect, and Initialized.

◆ SetClipping()

void vtkBoundingRectContextDevice2D::SetClipping ( int *  x)
override

Implement pure virtual member function. Does nothing.

References DelegateDevice.

◆ SetColor4()

void vtkBoundingRectContextDevice2D::SetColor4 ( unsigned char  color[4])
override

Implement pure virtual member function. Does not affect bounding rect.

References DelegateDevice.

◆ SetLineType()

void vtkBoundingRectContextDevice2D::SetLineType ( int  type)
override

Implement pure virtual member function. Forward line type to delegate device.

References DelegateDevice.

◆ SetLineWidth()

void vtkBoundingRectContextDevice2D::SetLineWidth ( float  width)
override

Implement pure virtual member function. Forward line width to delegate device.

References DelegateDevice.

◆ SetMatrix()

void vtkBoundingRectContextDevice2D::SetMatrix ( vtkMatrix3x3 *  m)
override

Forward current matrix to delegate device.

References DelegateDevice.

◆ SetPointSize()

void vtkBoundingRectContextDevice2D::SetPointSize ( float  size)
override

Implement pure virtual member function. Does not affect bounding rect.

References DelegateDevice.

◆ SetTexture()

void vtkBoundingRectContextDevice2D::SetTexture ( vtkImageData *  image,
int  properties 
)
override

Implement pure virtual member function. Does not affect bounding rect.

References DelegateDevice.

◆ vtkGetObjectMacro()

vtkBoundingRectContextDevice2D::vtkGetObjectMacro ( DelegateDevice  ,
vtkContextDevice2D   
)

◆ vtkSetObjectMacro()

vtkBoundingRectContextDevice2D::vtkSetObjectMacro ( DelegateDevice  ,
vtkContextDevice2D   
)

Set/get delegate device used to compute bounding boxes around strings.

◆ vtkTypeMacro()

vtkBoundingRectContextDevice2D::vtkTypeMacro ( vtkBoundingRectContextDevice2D  ,
vtkContextDevice2D   
) &

Member Data Documentation

◆ BoundingRect

vtkRectf vtkBoundingRectContextDevice2D::BoundingRect
protected

Cumulative rect holding the bounds of the primitives rendered by the device.

Referenced by AddPoint(), AddRect(), GetBoundingRect(), and Reset().

◆ DelegateDevice

◆ Initialized

bool vtkBoundingRectContextDevice2D::Initialized
protected

Is the bounding rect initialized?

Referenced by AddPoint(), AddRect(), and Reset().

◆ override

vtkIndent indent vtkBoundingRectContextDevice2D::override

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