51#ifndef vtkBorderRepresentation_h
52#define vtkBorderRepresentation_h
56#include "vtkInteractionWidgetsModule.h"
96 vtkViewportCoordinateMacro(Position);
97 vtkViewportCoordinateMacro(Position2);
134 vtkSetClampMacro(ShowVerticalBorder,
int, BORDER_OFF, BORDER_ACTIVE);
135 vtkGetMacro(ShowVerticalBorder,
int);
144 vtkSetClampMacro(ShowHorizontalBorder,
int, BORDER_OFF, BORDER_ACTIVE);
145 vtkGetMacro(ShowHorizontalBorder,
int);
174 vtkSetClampMacro(ShowPolygonBackground,
int, BORDER_OFF, BORDER_ACTIVE);
175 vtkGetMacro(ShowPolygonBackground,
int);
217 vtkSetVector2Macro(MinimumNormalizedViewportSize,
double);
218 vtkGetVector2Macro(MinimumNormalizedViewportSize,
double);
229 vtkSetVector2Macro(MinimumSize,
int);
230 vtkGetVector2Macro(MinimumSize,
int);
231 vtkSetVector2Macro(MaximumSize,
int);
232 vtkGetVector2Macro(MaximumSize,
int);
243 vtkSetClampMacro(Tolerance,
int, 1, 10);
244 vtkGetMacro(Tolerance,
int);
252 vtkGetVectorMacro(SelectionPoint,
double, 2);
290 vtkGetMacro(WindowLocation,
int);
309#if !defined(VTK_LEGACY_REMOVE)
314 vtkSetClampMacro(InteractionState,
int, 0, AdjustingE3);
352 "SetBWActorDisplayOverlay is deprecated. Use "
353 "SetBWActorDisplayOverlayEdges or SetBWActorDisplayOverlayPolygon instead.")
354 void SetBWActorDisplayOverlay(
bool);
356 void SetBWActorDisplayOverlayEdges(
bool);
357 void SetBWActorDisplayOverlayPolygon(
bool);
364 vtkSetVector3Macro(BorderColor,
double);
365 vtkGetVector3Macro(BorderColor,
double);
374 vtkGetMacro(BorderThickness,
float);
386 vtkSetClampMacro(CornerRadiusStrength,
double, 0.0, 1.0);
387 vtkGetMacro(CornerRadiusStrength,
double);
396 vtkSetClampMacro(CornerResolution,
int, 0, 1000);
397 vtkGetMacro(CornerResolution,
int);
405 vtkSetVector3Macro(PolygonColor,
double);
406 vtkGetVector3Macro(PolygonColor,
double);
414 vtkSetClampMacro(PolygonOpacity,
double, 0.0, 1.0);
415 vtkGetMacro(PolygonOpacity,
double);
422 void SetPolygonRGBA(
double rgba[4]);
423 void SetPolygonRGBA(
double r,
double g,
double b,
double a);
428 void GetPolygonRGBA(
double rgba[4]);
429 void GetPolygonRGBA(
double& r,
double& g,
double& b,
double& a);
437 int ShowVerticalBorder = BORDER_ON;
438 int ShowHorizontalBorder = BORDER_ON;
439 int ShowPolygonBackground = BORDER_ON;
446 double SelectionPoint[2] = { 0.0, 0.0 };
453 int WindowLocation = AnyLocation;
467 double StartPosition[2];
483 double MinimumNormalizedViewportSize[2] = { 0.0, 0.0 };
484 int MinimumSize[2] = { 1, 1 };
488 double BorderColor[3] = { 1.0, 1.0, 1.0 };
489 float BorderThickness = 1.0;
490 double CornerRadiusStrength = 0.0;
491 int CornerResolution = 20;
494 double PolygonColor[3] = { 1.0, 1.0, 1.0 };
495 double PolygonOpacity = 0.0;
a actor that draws 2D data
represent a vtkBorderWidget
virtual void GetSize(double size[2])
Subclasses should implement these methods.
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 SetShowPolygonToOn()
Specify when and if the border's polygon background should appear.
vtkNew< vtkActor2D > BWActorPolygon
void SetShowBorderToActive()
Specify when and if the border should appear.
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 SetShowPolygonToOff()
Specify when and if the border's polygon background should appear.
virtual void SetWindowLocation(int enumLocation)
Set the representation position, by enumeration ( AnyLocation = 0, LowerLeftCorner,...
static vtkBorderRepresentation * New()
Instantiate this class.
vtkNew< vtkCoordinate > PositionCoordinate
void ComputeRoundCorners()
Create all 4 round corners with the specified radius and resolution.
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.
InteractionStateType
Define the various states that the representation can be in.
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< vtkTransform > BWTransform
int RenderOpaqueGeometry(vtkViewport *) override
These methods are necessary to make this representation behave as a vtkProp.
virtual int GetShowPolygon()
Specify when and if the border's polygon background should appear.
virtual int GetShowBorderMaxValue()
Specify when and if the border should appear.
void PrintSelf(ostream &os, vtkIndent indent) override
Define standard methods.
vtkNew< vtkPoints > BWPoints
virtual void UpdateWindowLocation()
void SetShowPolygonToActive()
Specify when and if the border's polygon background should appear.
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.
virtual void SetShowPolygon(int border)
Specify when and if the border's polygon background should appear.
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
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
#define VTK_DEPRECATED_IN_9_2_0(reason)
vtkTypeUInt32 vtkMTimeType