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

#include <vtkBoundingRectContextDevice2D.h>

Inheritance diagram for vtkBoundingRectContextDevice2D:
Collaboration diagram for vtkBoundingRectContextDevice2D:

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 vtkBoundingRectContextDevice2DNew ()
 
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
 

Detailed Description

Definition at line 15 of file vtkBoundingRectContextDevice2D.h.

Constructor & Destructor Documentation

◆ vtkBoundingRectContextDevice2D()

vtkBoundingRectContextDevice2D::vtkBoundingRectContextDevice2D ( )
protected

◆ ~vtkBoundingRectContextDevice2D()

vtkBoundingRectContextDevice2D::~vtkBoundingRectContextDevice2D ( )
overrideprotected

Definition at line 28 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice, and NULL.

Member Function Documentation

◆ AddPoint() [1/2]

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

Definition at line 427 of file vtkBoundingRectContextDevice2D.cpp.

References BoundingRect, and Initialized.

◆ AddPoint() [2/2]

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

Add a point to the cumulative bounding rect.

Definition at line 421 of file vtkBoundingRectContextDevice2D.cpp.

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.

Definition at line 437 of file vtkBoundingRectContextDevice2D.cpp.

References BoundingRect, and Initialized.

◆ ApplyBrush()

void vtkBoundingRectContextDevice2D::ApplyBrush ( vtkBrush *  brush)
override

Forward the brush to the delegate device.

Definition at line 222 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ ApplyPen()

void vtkBoundingRectContextDevice2D::ApplyPen ( vtkPen *  pen)
override

Forward the pen to the delegate device.

Definition at line 206 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ ApplyTextProp()

void vtkBoundingRectContextDevice2D::ApplyTextProp ( vtkTextProperty *  prop)
override

Forward the text property to the delegate device.

Definition at line 238 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ Begin()

void vtkBoundingRectContextDevice2D::Begin ( vtkViewport *  viewport)
override

Call before drawing to this device.

Definition at line 384 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ BufferIdModeBegin()

void vtkBoundingRectContextDevice2D::BufferIdModeBegin ( vtkAbstractContextBufferId *  bufferId)
override

Begin ID buffering mode.

Definition at line 406 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ BufferIdModeEnd()

void vtkBoundingRectContextDevice2D::BufferIdModeEnd ( )
override

End ID buffering mode.

Definition at line 414 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ ComputeJustifiedStringBounds()

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

Forward string bounds calculation to the delegate device.

Definition at line 376 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ ComputeStringBounds()

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

Forward string bounds calculation to the delegate device.

Definition at line 368 of file vtkBoundingRectContextDevice2D.cpp.

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.

Definition at line 330 of file vtkBoundingRectContextDevice2D.cpp.

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.

Definition at line 353 of file vtkBoundingRectContextDevice2D.cpp.

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.

Definition at line 105 of file vtkBoundingRectContextDevice2D.cpp.

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.

Definition at line 262 of file vtkBoundingRectContextDevice2D.cpp.

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.

Definition at line 316 of file vtkBoundingRectContextDevice2D.cpp.

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.

Definition at line 88 of file vtkBoundingRectContextDevice2D.cpp.

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.

Definition at line 277 of file vtkBoundingRectContextDevice2D.cpp.

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.

Definition at line 292 of file vtkBoundingRectContextDevice2D.cpp.

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.

Definition at line 254 of file vtkBoundingRectContextDevice2D.cpp.

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.

Definition at line 71 of file vtkBoundingRectContextDevice2D.h.

◆ DrawString()

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

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

Definition at line 72 of file vtkBoundingRectContextDevice2D.cpp.

References AddPoint(), and DelegateDevice.

◆ EnableClipping()

void vtkBoundingRectContextDevice2D::EnableClipping ( bool  enable)
override

Implement pure virtual member function. Does nothing.

Definition at line 192 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ End()

void vtkBoundingRectContextDevice2D::End ( )
override

Call after drawing to this device.

Definition at line 391 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ GetBoundingRect() [1/2]

vtkRectf vtkBoundingRectContextDevice2D::GetBoundingRect ( )

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

Definition at line 67 of file vtkBoundingRectContextDevice2D.cpp.

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.

Definition at line 47 of file vtkBoundingRectContextDevice2D.cpp.

References context.

◆ GetBrush()

vtkBrush * vtkBoundingRectContextDevice2D::GetBrush ( )
override

Get the brush from the delegate device.

Definition at line 229 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice, and NULL.

◆ GetBufferIdMode()

bool vtkBoundingRectContextDevice2D::GetBufferIdMode ( ) const
override

Get value from delegate device.

Definition at line 398 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ GetMatrix()

void vtkBoundingRectContextDevice2D::GetMatrix ( vtkMatrix3x3 *  m)
override

Get current matrix from delegate device.

Definition at line 164 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ GetPen()

vtkPen * vtkBoundingRectContextDevice2D::GetPen ( )
override

Get the pen from the delegate device.

Definition at line 213 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice, and NULL.

◆ GetTextProp()

vtkTextProperty * vtkBoundingRectContextDevice2D::GetTextProp ( )
override

Get the text property from the delegate device.

Definition at line 245 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice, and NULL.

◆ MultiplyMatrix()

void vtkBoundingRectContextDevice2D::MultiplyMatrix ( vtkMatrix3x3 *  m)
override

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

Definition at line 171 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ New()

static vtkBoundingRectContextDevice2D* vtkBoundingRectContextDevice2D::New ( )
static

◆ PopMatrix()

void vtkBoundingRectContextDevice2D::PopMatrix ( )
override

Pope matrix from the delegate device.

Definition at line 185 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ PushMatrix()

void vtkBoundingRectContextDevice2D::PushMatrix ( )
override

Push matrix in the delegate device.

Definition at line 178 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ Reset()

void vtkBoundingRectContextDevice2D::Reset ( )

reset the bounding box.

Definition at line 41 of file vtkBoundingRectContextDevice2D.cpp.

References BoundingRect, and Initialized.

◆ SetClipping()

void vtkBoundingRectContextDevice2D::SetClipping ( int *  x)
override

Implement pure virtual member function. Does nothing.

Definition at line 199 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ SetColor4()

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

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

Definition at line 121 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ SetLineType()

void vtkBoundingRectContextDevice2D::SetLineType ( int  type)
override

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

Definition at line 150 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ SetLineWidth()

void vtkBoundingRectContextDevice2D::SetLineWidth ( float  width)
override

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

Definition at line 143 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ SetMatrix()

void vtkBoundingRectContextDevice2D::SetMatrix ( vtkMatrix3x3 *  m)
override

Forward current matrix to delegate device.

Definition at line 157 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ SetPointSize()

void vtkBoundingRectContextDevice2D::SetPointSize ( float  size)
override

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

Definition at line 136 of file vtkBoundingRectContextDevice2D.cpp.

References DelegateDevice.

◆ SetTexture()

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

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

Definition at line 128 of file vtkBoundingRectContextDevice2D.cpp.

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.

Definition at line 284 of file vtkBoundingRectContextDevice2D.h.

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

◆ DelegateDevice

◆ Initialized

bool vtkBoundingRectContextDevice2D::Initialized
protected

Is the bounding rect initialized?

Definition at line 278 of file vtkBoundingRectContextDevice2D.h.

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

◆ override

vtkIndent indent vtkBoundingRectContextDevice2D::override

Definition at line 20 of file vtkBoundingRectContextDevice2D.h.


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