Creates new view to the world world with new camera and adds it to the panel view collection.
Namespace:
SGP.XSpaceAssembly: SGPRTL (in SGPRTL.dll)
Version: 1.2.3019.18825
Syntax
C# |
---|
[DefaultMethodAttribute] public XCameraViewport CreateViewport( XWorld world, float x, float y, float width, float height, bool relative ) |
Parameters
- world
- Type: SGP.XSpace..::.XWorld
The world XWorld sprite where the new viewport will be created.
- x
- Type: System..::.Single
The X coordinate of the upper-left corner.
- y
- Type: System..::.Single
The Y coordinate of the upper-left corner.
- width
- Type: System..::.Single
View width.
- height
- Type: System..::.Single
View height.
- relative
- Type: System..::.Boolean
Whether coordinates are absolute or relative.
Return Value
Creates a new XCameraViewport viewport instance with the camera.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentNullException | world is nullNothingnullptra null reference (Nothing in Visual Basic). |