VTK
|
Clipped, transformed area with axes for context items. More...
#include <vtkContextArea.h>
Public Types | |
enum | DrawAreaResizeBehaviorType { DARB_Expand, DARB_FixedAspect, DARB_FixedRect, DARB_FixedMargins } |
typedef vtkTuple< int, 4 > | Margins |
typedef vtkAbstractContextItem | Superclass |
![]() | |
typedef vtkObject | Superclass |
![]() | |
typedef vtkObjectBase | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkContextArea * | NewInstance () const |
virtual void | PrintSelf (ostream &os, vtkIndent indent) |
vtkAxis * | GetAxis (vtkAxis::Location location) |
vtkAbstractContextItem * | GetDrawAreaItem () |
virtual bool | Paint (vtkContext2D *painter) |
virtual vtkRecti | GetGeometry () |
virtual void | SetGeometry (vtkRecti) |
virtual vtkRectd | GetDrawAreaBounds () |
virtual void | SetDrawAreaBounds (vtkRectd) |
virtual DrawAreaResizeBehaviorType | GetDrawAreaResizeBehavior () |
virtual void | SetDrawAreaResizeBehavior (DrawAreaResizeBehaviorType) |
virtual float | GetFixedAspect () |
virtual void | SetFixedAspect (float aspect) |
virtual vtkRecti | GetFixedRect () |
virtual void | SetFixedRect (vtkRecti rect) |
virtual void | SetFixedRect (int x, int y, int width, int height) |
virtual const Margins & | GetFixedMargins () |
virtual void | GetFixedMarginsArray (int margins[4]) |
virtual const int * | GetFixedMarginsArray () |
virtual void | SetFixedMargins (Margins margins) |
virtual void | SetFixedMargins (int margins[4]) |
virtual void | SetFixedMargins (int left, int right, int bottom, int top) |
virtual bool | GetFillViewport () |
virtual void | SetFillViewport (bool) |
virtual void | FillViewportOn () |
virtual void | FillViewportOff () |
virtual void | SetShowGrid (bool show) |
virtual bool | GetShowGrid () |
virtual void | ShowGridOn () |
virtual void | ShowGridOff () |
![]() | |
vtkAbstractContextItem * | NewInstance () const |
virtual void | Update () |
virtual bool | PaintChildren (vtkContext2D *painter) |
virtual void | ReleaseGraphicsResources () |
unsigned int | AddItem (vtkAbstractContextItem *item) |
bool | RemoveItem (vtkAbstractContextItem *item) |
bool | RemoveItem (unsigned int index) |
vtkAbstractContextItem * | GetItem (unsigned int index) |
unsigned int | GetItemIndex (vtkAbstractContextItem *item) |
unsigned int | GetNumberOfItems () |
void | ClearItems () |
unsigned int | Raise (unsigned int index) |
unsigned int | Lower (unsigned int index) |
virtual bool | Hit (const vtkContextMouseEvent &mouse) |
virtual vtkAbstractContextItem * | GetPickedItem (const vtkContextMouseEvent &mouse) |
virtual bool | MouseEnterEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseMoveEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseLeaveEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseButtonPressEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseButtonReleaseEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseDoubleClickEvent (const vtkContextMouseEvent &mouse) |
virtual bool | MouseWheelEvent (const vtkContextMouseEvent &mouse, int delta) |
virtual bool | KeyPressEvent (const vtkContextKeyEvent &key) |
virtual void | SetScene (vtkContextScene *scene) |
virtual void | SetParent (vtkAbstractContextItem *parent) |
virtual vtkVector2f | MapToParent (const vtkVector2f &point) |
virtual vtkVector2f | MapFromParent (const vtkVector2f &point) |
virtual vtkVector2f | MapToScene (const vtkVector2f &point) |
virtual vtkVector2f | MapFromScene (const vtkVector2f &point) |
virtual unsigned int | StackAbove (unsigned int index, unsigned int under) |
virtual unsigned int | StackUnder (unsigned int child, unsigned int above) |
virtual bool | KeyReleaseEvent (const vtkContextKeyEvent &key) |
vtkContextScene * | GetScene () |
vtkAbstractContextItem * | GetParent () |
virtual bool | GetVisible () |
virtual void | SetVisible (bool) |
virtual bool | GetInteractive () |
virtual void | SetInteractive (bool) |
![]() | |
vtkObject * | NewInstance () const |
virtual void | DebugOn () |
virtual void | DebugOff () |
bool | GetDebug () |
void | SetDebug (bool debugFlag) |
virtual void | Modified () |
virtual unsigned long | GetMTime () |
unsigned long | AddObserver (unsigned long event, vtkCommand *, float priority=0.0f) |
unsigned long | AddObserver (const char *event, vtkCommand *, float priority=0.0f) |
vtkCommand * | GetCommand (unsigned long tag) |
void | RemoveObserver (vtkCommand *) |
void | RemoveObservers (unsigned long event, vtkCommand *) |
void | RemoveObservers (const char *event, vtkCommand *) |
int | HasObserver (unsigned long event, vtkCommand *) |
int | HasObserver (const char *event, vtkCommand *) |
void | RemoveObserver (unsigned long tag) |
void | RemoveObservers (unsigned long event) |
void | RemoveObservers (const char *event) |
void | RemoveAllObservers () |
int | HasObserver (unsigned long event) |
int | HasObserver (const char *event) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
template<class U , class T > | |
unsigned long | AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f) |
int | InvokeEvent (unsigned long event, void *callData) |
int | InvokeEvent (const char *event, void *callData) |
int | InvokeEvent (unsigned long event) |
int | InvokeEvent (const char *event) |
![]() | |
const char * | GetClassName () const |
virtual void | Delete () |
virtual void | FastDelete () |
void | Print (ostream &os) |
virtual void | Register (vtkObjectBase *o) |
virtual void | UnRegister (vtkObjectBase *o) |
void | SetReferenceCount (int) |
void | PrintRevisions (ostream &) |
virtual void | PrintHeader (ostream &os, vtkIndent indent) |
virtual void | PrintTrailer (ostream &os, vtkIndent indent) |
int | GetReferenceCount () |
Static Public Member Functions | |
static int | IsTypeOf (const char *type) |
static vtkContextArea * | SafeDownCast (vtkObjectBase *o) |
static vtkContextArea * | New () |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkAbstractContextItem * | SafeDownCast (vtkObjectBase *o) |
![]() | |
static int | IsTypeOf (const char *type) |
static vtkObject * | SafeDownCast (vtkObjectBase *o) |
static vtkObject * | New () |
static void | BreakOnError () |
static void | SetGlobalWarningDisplay (int val) |
static void | GlobalWarningDisplayOn () |
static void | GlobalWarningDisplayOff () |
static int | GetGlobalWarningDisplay () |
![]() | |
static int | IsTypeOf (const char *name) |
static vtkObjectBase * | New () |
Protected Attributes | |
vtkTuple< vtkAxis *, 4 > | Axes |
vtkNew< vtkPlotGrid > | Grid |
vtkNew< vtkContextClip > | Clip |
vtkNew< vtkContextTransform > | Transform |
vtkRecti | Geometry |
vtkRectd | DrawAreaBounds |
vtkRecti | DrawAreaGeometry |
DrawAreaResizeBehaviorType | DrawAreaResizeBehavior |
float | FixedAspect |
vtkRecti | FixedRect |
Margins | FixedMargins |
bool | FillViewport |
![]() | |
vtkContextScene * | Scene |
vtkAbstractContextItem * | Parent |
vtkContextScenePrivate * | Children |
bool | Visible |
bool | Interactive |
![]() | |
bool | Debug |
vtkTimeStamp | MTime |
vtkSubjectHelper * | SubjectHelper |
![]() | |
vtkAtomicInt32 | ReferenceCount |
vtkWeakPointerBase ** | WeakPointers |
Clipped, transformed area with axes for context items.
vtkContextArea provides an clipped drawing area surrounded by four axes. The drawing area is transformed to map the 2D area described by DrawAreaBounds into pixel coordinates. DrawAreaBounds is also used to configure the axes. Item to be rendered in the draw area should be added to the context item returned by GetDrawAreaItem().
The size and shape of the draw area is configured by the following member variables:
FixedMargins: Margins to enforce for FixedMargins resize behavior.
Definition at line 56 of file vtkContextArea.h.
typedef vtkTuple<int, 4> vtkContextArea::Margins |
Definition at line 59 of file vtkContextArea.h.
Definition at line 60 of file vtkContextArea.h.
Enumerator | |
---|---|
DARB_Expand | |
DARB_FixedAspect | |
DARB_FixedRect | |
DARB_FixedMargins |
Definition at line 91 of file vtkContextArea.h.
|
protected |
|
protected |
|
static |
|
virtual |
Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.
Reimplemented from vtkAbstractContextItem.
|
static |
|
protectedvirtual |
Reimplemented from vtkAbstractContextItem.
vtkContextArea* vtkContextArea::NewInstance | ( | ) | const |
|
virtual |
Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.
Reimplemented from vtkAbstractContextItem.
|
static |
vtkAxis* vtkContextArea::GetAxis | ( | vtkAxis::Location | location | ) |
Get the vtkAxis associated with the specified location.
vtkAbstractContextItem* vtkContextArea::GetDrawAreaItem | ( | ) |
Returns the vtkAbstractContextItem that will draw in the clipped, transformed space. This is the item to add children for.
|
virtual |
Paint event for the item, called whenever the item needs to be drawn.
Reimplemented from vtkAbstractContextItem.
|
virtual |
The rect defining the pixel location and size of the entire vtkContextArea, including axis labels, title, etc. Note that this will be updated to the window geometry if FillWindow is true.
|
virtual |
The rect defining the pixel location and size of the entire vtkContextArea, including axis labels, title, etc. Note that this will be updated to the window geometry if FillWindow is true.
|
virtual |
The data bounds of the clipped and transformed area inside of the axes. This is used to configure the axes labels and setup the transform.
|
virtual |
The data bounds of the clipped and transformed area inside of the axes. This is used to configure the axes labels and setup the transform.
|
virtual |
Set the resize behavior for the draw area: - Expand: The default behavior. The draw area will automatically resize to take up as much of Geometry as possible. Margin sizes are minimized based on the space required for axis labels/tick marks. - FixedAspect: Same as Expand, but a fixed aspected ratio is enforced. See SetFixedAspect. - FixedRect: Draw area is always constrained to a fixed rectangle. See SetFixedRect. - FixMargins: The draw area expands to fill Geometry, but margins (axis labels, etc) are fixed, rather than dynamically sized. See SetFixedMargins.
|
virtual |
Set the resize behavior for the draw area: - Expand: The default behavior. The draw area will automatically resize to take up as much of Geometry as possible. Margin sizes are minimized based on the space required for axis labels/tick marks. - FixedAspect: Same as Expand, but a fixed aspected ratio is enforced. See SetFixedAspect. - FixedRect: Draw area is always constrained to a fixed rectangle. See SetFixedRect. - FixMargins: The draw area expands to fill Geometry, but margins (axis labels, etc) are fixed, rather than dynamically sized. See SetFixedMargins.
|
virtual |
The fixed aspect ratio, if DrawAreaResizeBehavior is FixedAspect. Defined as width/height. Default is 1. Setting the aspect ratio will also set DrawAreaResizeBehavior to FixedAspect.
|
virtual |
The fixed aspect ratio, if DrawAreaResizeBehavior is FixedAspect. Defined as width/height. Default is 1. Setting the aspect ratio will also set DrawAreaResizeBehavior to FixedAspect.
|
virtual |
The fixed rect to use for the draw area, if DrawAreaResizeBehavior is FixedRect. Units are in pixels, default is 300x300+0+0. Setting the fixed rect will also set DrawAreaResizeBehavior to FixedRect.
|
virtual |
The fixed rect to use for the draw area, if DrawAreaResizeBehavior is FixedRect. Units are in pixels, default is 300x300+0+0. Setting the fixed rect will also set DrawAreaResizeBehavior to FixedRect.
The fixed rect to use for the draw area, if DrawAreaResizeBehavior is FixedRect. Units are in pixels, default is 300x300+0+0. Setting the fixed rect will also set DrawAreaResizeBehavior to FixedRect.
|
inlinevirtual |
The left, right, bottom, and top margins for the draw area, if DrawAreaResizeBehavior is FixedMargins. Units are in pixels, default is { 0, 0, 0, 0 }. Setting the fixed margins will also set DrawAreaResizeBehavior to FixedMargins.
Definition at line 134 of file vtkContextArea.h.
|
virtual |
The left, right, bottom, and top margins for the draw area, if DrawAreaResizeBehavior is FixedMargins. Units are in pixels, default is { 0, 0, 0, 0 }. Setting the fixed margins will also set DrawAreaResizeBehavior to FixedMargins.
|
virtual |
The left, right, bottom, and top margins for the draw area, if DrawAreaResizeBehavior is FixedMargins. Units are in pixels, default is { 0, 0, 0, 0 }. Setting the fixed margins will also set DrawAreaResizeBehavior to FixedMargins.
|
virtual |
The left, right, bottom, and top margins for the draw area, if DrawAreaResizeBehavior is FixedMargins. Units are in pixels, default is { 0, 0, 0, 0 }. Setting the fixed margins will also set DrawAreaResizeBehavior to FixedMargins.
|
virtual |
The left, right, bottom, and top margins for the draw area, if DrawAreaResizeBehavior is FixedMargins. Units are in pixels, default is { 0, 0, 0, 0 }. Setting the fixed margins will also set DrawAreaResizeBehavior to FixedMargins.
The left, right, bottom, and top margins for the draw area, if DrawAreaResizeBehavior is FixedMargins. Units are in pixels, default is { 0, 0, 0, 0 }. Setting the fixed margins will also set DrawAreaResizeBehavior to FixedMargins.
|
virtual |
If true, Geometry is set to (0, 0, vpSize[0], vpSize[1]) at the start of each Paint call. vpSize is vtkContextDevice2D::GetViewportSize. Default is true.
|
virtual |
If true, Geometry is set to (0, 0, vpSize[0], vpSize[1]) at the start of each Paint call. vpSize is vtkContextDevice2D::GetViewportSize. Default is true.
|
virtual |
If true, Geometry is set to (0, 0, vpSize[0], vpSize[1]) at the start of each Paint call. vpSize is vtkContextDevice2D::GetViewportSize. Default is true.
|
virtual |
If true, Geometry is set to (0, 0, vpSize[0], vpSize[1]) at the start of each Paint call. vpSize is vtkContextDevice2D::GetViewportSize. Default is true.
|
virtual |
Turn on/off grid visibility.
|
virtual |
Turn on/off grid visibility.
|
inlinevirtual |
Turn on/off grid visibility.
Definition at line 155 of file vtkContextArea.h.
|
inlinevirtual |
Turn on/off grid visibility.
Definition at line 156 of file vtkContextArea.h.
|
protected |
Sync the Axes locations with Geometry, and update the DrawAreaGeometry to account for Axes size (margins). Must be called while the painter is active.
|
protected |
Return the draw area's geometry.
|
protected |
Working implementations for ComputeDrawAreaGeometry.
|
protected |
Working implementations for ComputeDrawAreaGeometry.
|
protected |
Working implementations for ComputeDrawAreaGeometry.
|
protected |
Working implementations for ComputeDrawAreaGeometry.
|
protected |
Set the transform to map DrawAreaBounds to DrawAreaGeometry. Should be called after LayoutAxes to ensure that DrawAreaGeometry is up to date.
vtkAxis objects that surround the draw area, indexed by vtkAxis::Location.
Definition at line 186 of file vtkContextArea.h.
|
protected |
The vtkPlotGrid that renders a grid atop the data in the draw area.
Definition at line 189 of file vtkContextArea.h.
|
protected |
The context item that clips rendered data.
Definition at line 192 of file vtkContextArea.h.
|
protected |
The context item that clips rendered data.
Definition at line 195 of file vtkContextArea.h.
|
protected |
The rect defining the pixel location and size of the entire vtkContextArea, including axis label, title, etc.
Definition at line 199 of file vtkContextArea.h.
|
protected |
The data bounds of the clipped and transformed area inside of the axes. This is used to configure the axes labels and setup the transform.
Definition at line 204 of file vtkContextArea.h.
|
protected |
The rect defining the pixel location and size of the clipped and transformed area inside the axes. Relative to Geometry.
Definition at line 208 of file vtkContextArea.h.
|
protected |
Controls how the draw area size is determined.
Definition at line 211 of file vtkContextArea.h.
|
protected |
The fixed aspect ratio, if DrawAreaResizeBehavior is FixedAspect. Defined as width/height. Default is 1.
Definition at line 215 of file vtkContextArea.h.
|
protected |
The fixed rect to use for the draw area, if DrawAreaResizeBehavior is FixedRect. Units are in pixels, default is 300x300+0+0.
Definition at line 219 of file vtkContextArea.h.
|
protected |
The left, right, bottom, and top margins for the draw area, if DrawAreaResizeBehavior is FixedMargins. Units are in pixels, default is { 0, 0, 0, 0 }
Definition at line 224 of file vtkContextArea.h.
|
protected |
If true, Geometry is set to (0, 0, vpSize[0], vpSize[1]) at the start of each Paint call. vpSize is vtkContextDevice2D::GetViewportSize. Default is true.
Definition at line 229 of file vtkContextArea.h.