-
Notifications
You must be signed in to change notification settings - Fork 0
Viewport
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.Viewport |
| Namespace | Electron2D |
| Kind | class |
| Category | Rendering |
Provides the Electron2D viewport node for 2D camera selection and canvas transforms.
public class Electron2D.Viewport : Electron2D.NodeProfile: Electron2D 0.1.0 2D
Status: Partial / Not verified
Out of profile: yes
Godot reference: Viewport
Runtime 2D viewport subset with current camera, visible rect, canvas transform, pixel snapping, root instance and input handled-state baseline.
Electron2D 0.1.0 Preview uses Viewport as the concrete root node created
by Electron2D.SceneTree. The public SceneTree.Root property remains
typed as Electron2D.Node for the current object-model baseline.
This type is not synchronized. Create and mutate viewports on the main scene thread.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.Camera2D
| Member | Kind | Summary |
|---|---|---|
CanvasTransform |
Property | Gets or sets the base transform applied to 2D canvas submission. |
Size |
Property | Gets or sets the viewport size in pixels. |
Snap2DTransformsToPixel |
Property | Gets or sets whether submitted 2D transforms snap to full pixels. |
Snap2DVerticesToPixel |
Property | Gets or sets whether submitted 2D destination rectangles snap to full pixels. |
Electron2D.Viewport() |
Constructor | Initializes a new instance of the Viewport type. |
GetCamera2D() |
Method | Gets the current active 2D camera. |
GetTexture() |
Method | Gets the dynamic texture that represents this viewport. |
GetVisibleRect() |
Method | Gets the visible viewport rectangle. |
GuiGetHoveredControl() |
Method | Gets the control currently under the GUI pointer. |
SetInputAsHandled() |
Method | Marks the input event currently being dispatched by this viewport as handled. |
Kind: Property
public Electron2D.Transform2D CanvasTransform { get; set; }Gets or sets the base transform applied to 2D canvas submission.
The active Electron2D.Camera2D transform is applied after this
transform when internal sprite submission is built.
The current canvas transform value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Viewport
Kind: Property
public Electron2D.Vector2I Size { get; set; }Gets or sets the viewport size in pixels.
This property follows the validation and lifetime rules of its declaring type.
The current size value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Viewport
Kind: Property
public System.Boolean Snap2DTransformsToPixel { get; set; }Gets or sets whether submitted 2D transforms snap to full pixels.
Snapping affects internal render commands only. It does not mutate node transforms.
The current snap2 dtransforms to pixel value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Viewport
Kind: Property
public System.Boolean Snap2DVerticesToPixel { get; set; }Gets or sets whether submitted 2D destination rectangles snap to full pixels.
This is the command-level baseline for future GPU vertex snapping.
The current snap2 dvertices to pixel value.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Viewport
Kind: Constructor
public Electron2D.Viewport()Initializes a new instance of the Viewport type.
The new instance follows the lifetime and validation rules of its declaring type.
This member is not synchronized. Call it from the thread that owns the related object unless the declaring type states otherwise.
This API is available since Electron2D 0.1.0 Preview.
Electron2D.Viewport
Kind: Method
public Electron2D.Camera2D GetCamera2D()()Gets the current active 2D camera.
This method follows the validation and lifetime rules of its declaring type.
The current Electron2D.Camera2D, or null when no camera is current.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Viewport
Kind: Method
public Electron2D.ViewportTexture GetTexture()()Gets the dynamic texture that represents this viewport.
The returned texture reflects the current Electron2D.Viewport.Size when its
metadata is queried. Electron2D 0.1.0 Preview exposes the Electron2D
resource object before exposing public image readback or GPU handles.
A Electron2D.ViewportTexture bound to this viewport. The same
instance is returned on later calls.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.ViewportTexture
Kind: Method
public Electron2D.Rect2 GetVisibleRect()()Gets the visible viewport rectangle.
This method follows the validation and lifetime rules of its declaring type.
A rectangle starting at Electron2D.Vector2.Zero with the current viewport size.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Viewport
Kind: Method
public Electron2D.Control GuiGetHoveredControl()()Gets the control currently under the GUI pointer.
The value is updated during Electron2D.SceneTree.DispatchInput(Electron2D.InputEvent)
when the dispatched event carries a pointer position.
The last visible control hit by mouse or touch input, or null
when no control is currently hovered.
This method is not synchronized. Call it on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.GetTooltip(Electron2D.Vector2)
Kind: Method
public System.Void SetInputAsHandled()()Marks the input event currently being dispatched by this viewport as handled.
This method affects only the event that is currently moving through
Electron2D.SceneTree.DispatchInput(Electron2D.InputEvent). The process-wide
Electron2D.Input state has already been updated before user callbacks
can call this method, so action state is not rolled back.
Calling this method when the viewport is not dispatching an input event has no effect.
This method is not synchronized. Call it from the main scene thread while processing input for this viewport.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.AcceptEventElectron2D.Node.GetViewport
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.