I

IVisibilityTestable

Interface that is implemented for elements that can determine whether they might be visible in a given clipping rectangle.
Inheritance Hierarchy

See Also

Developer's Guide

API

IVisualCreator, CanvasComponent, IObjectRenderer, IRenderTreeElement

Demos

Adjust the visibility check to parts of the node visualization that lie outside of the node bounds

Members

No filters for this type

Methods

Determines whether an element might intersect the visible region for a given context.
Conservative implementations can always return true.
abstract

Parameters

context: ICanvasContext
The context to determine the visibility for.
rectangle: Rect
The visible region clip.

Return Value

boolean
false if and only if it is safe not to render the element because it would not affect the given clipping region.

Constants

An implementation of a IVisibilityTestable that always yields true.
An implementation of a IVisibilityTestable that always yields false.

Static Methods

Creates an implementation of the interface IVisibilityTestable by using the given function as implementation for its isVisible method.
static

Parameters

isVisible: function(ICanvasContext, Rect): boolean
A function for IVisibilityTestable's single abstract method isVisible.

Return Value

IVisibilityTestable
An instance of the IVisibilityTestable interface based on the given function.