OrthographicSize class sealed Scene graph
How an OrthographicProjection sizes its view volume against the render target's aspect ratio. Sizes are full world-unit extents, not half extents.
Constructors
- OrthographicSize.contain(double width, double height)
-
Shows at least
widthbyheightworld units, growing one axis to match the aspect ratio so the whole area stays visible.constfactory - OrthographicSize.cover(double width, double height)
-
Shows at most
widthbyheightworld units, cropping one axis to match the aspect ratio so the view is filled.constfactory - OrthographicSize.height(double height)
-
Shows
heightworld units vertically; the width follows the aspect ratio.constfactory - OrthographicSize.pixelsPerUnit(double pixelsPerUnit)
-
Shows one world unit per
pixelsPerUnitlogical pixels of the view, so on-screen size stays constant as the view resizes (more of the world shows in a bigger view).constfactory - OrthographicSize.stretch(double width, double height)
-
Shows exactly
widthbyheightworld units, stretching the image when the aspect ratio differs.constfactory - OrthographicSize.width(double width)
-
Shows
widthworld units horizontally; the height follows the aspect ratio.constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
visibleSize(
Size viewportSize) → Vector2 -
The visible (width, height) in world units for a view of
viewportSizelogical pixels.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited