98#ifndef vtkBorderRepresentation_h
99#define vtkBorderRepresentation_h
102#include "vtkInteractionWidgetsModule.h"
142 vtkViewportCoordinateMacro(Position);
143 vtkViewportCoordinateMacro(Position2);
179 vtkSetClampMacro(ShowVerticalBorder,
int, BORDER_OFF, BORDER_ACTIVE);
180 vtkGetMacro(ShowVerticalBorder,
int);
188 vtkSetClampMacro(ShowHorizontalBorder,
int, BORDER_OFF, BORDER_ACTIVE);
189 vtkGetMacro(ShowHorizontalBorder,
int);
238 vtkSetVector2Macro(MinimumNormalizedViewportSize,
double);
239 vtkGetVector2Macro(MinimumNormalizedViewportSize,
double);
250 vtkSetVector2Macro(MinimumSize,
int);
251 vtkGetVector2Macro(MinimumSize,
int);
252 vtkSetVector2Macro(MaximumSize,
int);
253 vtkGetVector2Macro(MaximumSize,
int);
264 vtkSetClampMacro(Tolerance,
int, 1, 10);
265 vtkGetMacro(Tolerance,
int);
273 vtkGetVectorMacro(SelectionPoint,
double, 2);
303 vtkSetClampMacro(InteractionState,
int, 0, AdjustingE3);
347 vtkSetVector3Macro(BorderColor,
double);
348 vtkGetVector3Macro(BorderColor,
double);
357 vtkGetMacro(BorderThickness,
float);
369 vtkSetClampMacro(CornerRadiusStrength,
double, 0.0, 1.0);
370 vtkGetMacro(CornerRadiusStrength,
double);
379 vtkSetClampMacro(CornerResolution,
int, 0, 1000);
380 vtkGetMacro(CornerResolution,
int);
388 vtkSetVector3Macro(PolygonColor,
double);
389 vtkGetVector3Macro(PolygonColor,
double);
397 vtkSetClampMacro(PolygonOpacity,
double, 0.0, 1.0);
398 vtkGetMacro(PolygonOpacity,
double);
420 int ShowVerticalBorder = BORDER_ON;
421 int ShowHorizontalBorder = BORDER_ON;
428 double SelectionPoint[2] = { 0.0, 0.0 };
445 double StartPosition[2];
461 double MinimumNormalizedViewportSize[2] = { 0.0, 0.0 };
462 int MinimumSize[2] = { 1, 1 };
466 double BorderColor[3] = { 1.0, 1.0, 1.0 };
467 float BorderThickness = 1.0;
468 double CornerRadiusStrength = 0.0;
469 int CornerResolution = 20;
472 double PolygonColor[3] = { 1.0, 1.0, 1.0 };
473 double PolygonOpacity = 0.0;
a actor that draws 2D data
represent a vtkBorderWidget
virtual void GetSize(double size[2])
Subclasses should implement these methods.
void SetPolygonRGBA(double r, double g, double b, double a)
Convenience method to set the background color and the opacity at once.
void GetPolygonRGBA(double rgba[4])
Convenience method to get the background color and the opacity at once.
vtkNew< vtkProperty2D > BorderProperty
int RenderTranslucentPolygonalGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
virtual int GetShowBorderMinValue()
Specify when and if the border should appear.
vtkNew< vtkPolyDataMapper2D > BWMapperEdges
void GetPolygonRGBA(double &r, double &g, double &b, double &a)
Convenience method to set the background color and the opacity at once.
vtkNew< vtkActor2D > BWActorPolygon
void SetShowBorderToActive()
Specify when and if the border should appear.
_InteractionState
Define the various states that the representation can be in.
void WidgetInteraction(double eventPos[2]) override
Subclasses should implement these methods.
void GetActors2D(vtkPropCollection *) override
These methods are necessary to make this representation behave as a vtkProp.
void SetBWActorDisplayOverlay(bool)
~vtkBorderRepresentation() override
static vtkBorderRepresentation * New()
Instantiate this class.
vtkNew< vtkCoordinate > PositionCoordinate
void ComputeRoundCorners()
Create all 4 round corners with the specified radius and resolution.
vtkBorderRepresentation()
vtkNew< vtkCoordinate > Position2Coordinate
virtual void NegotiateLayout()
vtkTypeBool HasTranslucentPolygonalGeometry() override
These methods are necessary to make this representation behave as a vtkProp.
int ComputeInteractionState(int X, int Y, int modify=0) override
Subclasses should implement these methods.
void SetShowBorderToOn()
Specify when and if the border should appear.
virtual void SetShowBorder(int border)
Specify when and if the border should appear.
void StartWidgetInteraction(double eventPos[2]) override
Subclasses should implement these methods.
vtkNew< vtkProperty2D > PolygonProperty
vtkNew< vtkTransform > BWTransform
int RenderOpaqueGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
virtual int GetShowBorderMaxValue()
Specify when and if the border should appear.
void PrintSelf(ostream &os, vtkIndent indent) override
Define standard methods.
vtkNew< vtkPoints > BWPoints
vtkNew< vtkPolyDataMapper2D > BWMapperPolygon
int RenderOverlay(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
void BuildRepresentation() override
Subclasses should implement these methods.
void ComputeOneRoundCorner(vtkCellArray *polys, vtkPoints *points, const double radius, vtkIdType xPt, vtkIdType yPt, const double startAngle)
Create a quarter circle centered in point[idCenterX].x, point[idCenterY].y), of radius 'radius' with ...
virtual int GetShowBorder()
Specify when and if the border should appear.
vtkNew< vtkPolyData > PolyDataEdges
void SetPolygonRGBA(double rgba[4])
Convenience method to set the background color and the opacity at once.
vtkNew< vtkActor2D > BWActorEdges
vtkNew< vtkTransformPolyDataFilter > BWTransformFilter
vtkNew< vtkPolyData > BWPolyData
void SetShowBorderToOff()
Specify when and if the border should appear.
vtkNew< vtkPolyData > PolyDataPolygon
void ReleaseGraphicsResources(vtkWindow *) override
These methods are necessary to make this representation behave as a vtkProp.
vtkMTimeType GetMTime() override
Return the MTime of this object.
virtual void UpdateShowBorder()
object to represent cell connectivity
a simple class to control print indentation
Allocate and hold a VTK object.
represent and manipulate 3D points
draw vtkPolyData onto the image plane
concrete dataset represents vertices, lines, polygons, and triangle strips
represent surface properties of a 2D image
abstract specification for Viewports
window superclass for vtkRenderWindow
vtkTypeUInt32 vtkMTimeType