// ----------------------------------------------------------------------- // // Copyright 2014 MIT Licence. See licence.md for more information. // // ----------------------------------------------------------------------- namespace Perspex { using Perspex.Collections; using Perspex.Media; /// /// Represents a node in the visual scene graph. /// /// /// The interface defines the interface required for a renderer to /// render a scene graph. You should not usually need to reference this interface unless /// you are writing a renderer; instead use the extension methods defined in /// to traverse the scene graph. This interface is /// implemented by . It should not be necessary to implement it /// anywhere else. /// public interface IVisual { /// /// Gets the bounds of the scene graph node. /// Rect Bounds { get; } /// /// Gets a value indicating whether the scene graph node should be clipped to its bounds. /// bool ClipToBounds { get; } /// /// Gets a value indicating whether this scene graph node and all its parents are visible. /// bool IsEffectivelyVisible { get; } /// /// Gets a value indicating whether this scene graph node is visible. /// bool IsVisible { get; } /// /// Gets the opacity of the scene graph node. /// double Opacity { get; } /// /// Gets the render transform of the scene graph node. /// Transform RenderTransform { get; } /// /// Gets the transform origin of the scene graph node. /// Origin TransformOrigin { get; } /// /// Gets the scene graph node's child nodes. /// IPerspexReadOnlyList VisualChildren { get; } /// /// Gets the scene graph node's parent node. /// IVisual VisualParent { get; } /// /// Gets the Z index of the node. /// int ZIndex { get; } /// /// Renders the scene graph node to a . /// /// The context. void Render(IDrawingContext context); /// /// Returns a transform that transforms the visual's coordinates into the coordinates /// of the specified . /// /// The visual to translate the coordinates to. /// A containing the transform. Matrix TransformToVisual(IVisual visual); } }