Creates a new view for the given camera XCamera.
Namespace:
SGP.XSpaceAssembly: SGPRTL (in SGPRTL.dll)
Version: 1.2.3019.18825
Syntax
| C# |
|---|
[DefaultMethodAttribute] public XCameraViewport CreateViewport( XCamera camera, float x, float y, float width, float height, bool relative ) |
Parameters
- camera
- Type: SGP.XSpace..::.XCamera
The source camera.
- 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 | camera is nullNothingnullptra null reference (Nothing in Visual Basic). |