SceneViewBox Class
The view box of a group (SceneGroup.ViewBox), as a nested SVG svg element: a rectangle of the coordinates of the children, mapped to a viewport of the coordinates of the group, which cuts what is outside of it.
public sealed class SceneViewBox : IEquatable<SceneViewBox>- Implements
Constructors
| Name | Description |
|---|---|
| SceneViewBox(SceneBounds, SceneBounds) | The view box of a group (SceneGroup.ViewBox), as a nested SVG svg element: a rectangle of the coordinates of the children, mapped to a viewport of the coordinates of the group, which cuts what is outside of it. |
SceneViewBox(SceneBounds, SceneBounds)
SceneViewBox.csThe view box of a group (SceneGroup.ViewBox), as a nested SVG svg element: a rectangle of the coordinates of the children, mapped to a viewport of the coordinates of the group, which cuts what is outside of it.
public SceneViewBox(SceneBounds Box, SceneBounds Viewport)Parameters
BoxSceneBounds- The rectangle of the coordinates of the children that is shown, as the SVG
viewBox. ViewportSceneBounds- The rectangle it is shown in, in the coordinates of the group (inside its
SceneElement.Transform).
Properties
| Name | Description |
|---|---|
| Alignment | Gets how the box keeps its proportions in the viewport. The default is SceneAspectRatio.XMidYMid, as in SVG. |
| Box | The rectangle of the coordinates of the children that is shown, as the SVG viewBox. |
| Slice | Gets a value that indicates whether the box covers the whole viewport and is cut (slice), rather than fitting in it (meet, the default). It does not apply when SceneViewBox.Alignment is SceneAspectRatio.None. |
| Viewport | The rectangle it is shown in, in the coordinates of the group (inside its SceneElement.Transform). |
Alignment
SceneViewBox.csGets how the box keeps its proportions in the viewport. The default is SceneAspectRatio.XMidYMid, as in SVG.
public SceneAspectRatio Alignment { get; init; }Property value
The rectangle of the coordinates of the children that is shown, as the SVG viewBox.
public SceneBounds Box { get; init; }Property value
Slice
SceneViewBox.csGets a value that indicates whether the box covers the whole viewport and is cut (slice), rather than fitting in it (meet, the default). It does not apply when SceneViewBox.Alignment is SceneAspectRatio.None.
public bool Slice { get; init; }Property value
Viewport
SceneViewBox.csThe rectangle it is shown in, in the coordinates of the group (inside its SceneElement.Transform).
public SceneBounds Viewport { get; init; }Property value
Methods
| Name | Description |
|---|---|
| Deconstruct(SceneBounds, SceneBounds) | |
| Equals(SceneViewBox?) | |
| Equals(object?) | |
| GetHashCode() | |
| GetTransform() | Gets the transform from the coordinates of the children to the coordinates of the group, as SVG computes it. |
| ToString() |
Deconstruct(SceneBounds, SceneBounds)
public void Deconstruct(out SceneBounds Box, out SceneBounds Viewport)Parameters
BoxSceneBoundsViewportSceneBounds
No documentation is available.
Equals overloads
Equals(SceneViewBox?)
public bool Equals(SceneViewBox? other)No documentation is available.
Equals(object?)
GetHashCode()
GetTransform()
SceneViewBox.csGets the transform from the coordinates of the children to the coordinates of the group, as SVG computes it.
public SceneTransform? GetTransform()Returns
SceneTransform? The transform, or null when the box or the viewport has no area or a coordinate that is not finite: nothing is drawn.
ToString()
Operators
| Name | Description |
|---|---|
| operator ==(SceneViewBox?, SceneViewBox?) | |
| operator !=(SceneViewBox?, SceneViewBox?) |
operator ==(SceneViewBox?, SceneViewBox?)
public static bool operator ==(SceneViewBox? left, SceneViewBox? right)No documentation is available.
operator !=(SceneViewBox?, SceneViewBox?)
public static bool operator !=(SceneViewBox? left, SceneViewBox? right)No documentation is available.