39 #ifndef vtkBorderRepresentation_h
40 #define vtkBorderRepresentation_h
44 #include "vtkInteractionWidgetsModule.h"
45 #include "vtkLegacy.h"
50 VTK_ABI_NAMESPACE_BEGIN
87 vtkViewportCoordinateMacro(Position2);
124 vtkSetClampMacro(ShowVerticalBorder,
int, BORDER_OFF, BORDER_ACTIVE);
125 vtkGetMacro(ShowVerticalBorder,
int);
134 vtkSetClampMacro(ShowHorizontalBorder,
int, BORDER_OFF, BORDER_ACTIVE);
135 vtkGetMacro(ShowHorizontalBorder,
int);
164 vtkSetClampMacro(ShowPolygonBackground,
int, BORDER_OFF, BORDER_ACTIVE);
165 vtkGetMacro(ShowPolygonBackground,
int);
207 vtkSetVector2Macro(MinimumNormalizedViewportSize,
double);
208 vtkGetVector2Macro(MinimumNormalizedViewportSize,
double);
219 vtkSetVector2Macro(MinimumSize,
int);
220 vtkGetVector2Macro(MinimumSize,
int);
221 vtkSetVector2Macro(MaximumSize,
int);
222 vtkGetVector2Macro(MaximumSize,
int);
233 vtkSetClampMacro(Tolerance,
int, 1, 10);
234 vtkGetMacro(Tolerance,
int);
242 vtkGetVectorMacro(SelectionPoint,
double, 2);
280 vtkGetMacro(WindowLocation,
int);
307 #if !defined(VTK_LEGACY_REMOVE)
312 vtkSetClampMacro(InteractionState,
int, 0, AdjustingE3);
350 "SetBWActorDisplayOverlay is deprecated. Use "
351 "SetBWActorDisplayOverlayEdges or SetBWActorDisplayOverlayPolygon instead.")
352 void SetBWActorDisplayOverlay(
bool);
354 void SetBWActorDisplayOverlayEdges(
bool);
355 void SetBWActorDisplayOverlayPolygon(
bool);
362 vtkSetVector3Macro(BorderColor,
double);
363 vtkGetVector3Macro(BorderColor,
double);
372 vtkGetMacro(BorderThickness,
float);
384 vtkSetClampMacro(CornerRadiusStrength,
double, 0.0, 1.0);
385 vtkGetMacro(CornerRadiusStrength,
double);
394 vtkSetClampMacro(CornerResolution,
int, 0, 1000);
395 vtkGetMacro(CornerResolution,
int);
403 vtkSetVector3Macro(PolygonColor,
double);
404 vtkGetVector3Macro(PolygonColor,
double);
412 vtkSetClampMacro(PolygonOpacity,
double, 0.0, 1.0);
413 vtkGetMacro(PolygonOpacity,
double);
420 void SetPolygonRGBA(
double rgba[4]);
421 void SetPolygonRGBA(
double r,
double g,
double b,
double a);
426 void GetPolygonRGBA(
double rgba[4]);
427 void GetPolygonRGBA(
double& r,
double& g,
double& b,
double& a);
435 int ShowVerticalBorder = BORDER_ON;
436 int ShowHorizontalBorder = BORDER_ON;
437 int ShowPolygonBackground = BORDER_ON;
444 double SelectionPoint[2] = { 0.0, 0.0 };
451 int WindowLocation = AnyLocation;
464 double StartPosition[2];
480 double MinimumNormalizedViewportSize[2] = { 0.0, 0.0 };
481 int MinimumSize[2] = { 1, 1 };
485 double BorderColor[3] = { 1.0, 1.0, 1.0 };
486 float BorderThickness = 1.0;
487 double CornerRadiusStrength = 0.0;
488 int CornerResolution = 20;
491 double PolygonColor[3] = { 1.0, 1.0, 1.0 };
492 double PolygonOpacity = 0.0;
514 VTK_ABI_NAMESPACE_END
a actor that draws 2D data
represent a vtkBorderWidget
virtual void GetSize(double size[2])
Subclasses should implement these methods.
static vtkBorderRepresentation * New()
Instantiate this class.
void ComputeOneRoundCorner(vtkCellArray *polys, vtkPoints *points, double radius, vtkIdType xPt, vtkIdType yPt, double startAngle)
Create a quarter circle centered in point[idCenterX].x, point[idCenterY].y), of radius 'radius' with ...
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,...
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()
Update window location if a window location is set.
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.
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
struct Position_t Position
#define VTK_DEPRECATED_IN_9_2_0(reason)
vtkTypeUInt32 vtkMTimeType