-
Notifications
You must be signed in to change notification settings - Fork 0
TextureRect
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.TextureRect |
| Namespace | Electron2D |
| Kind | class |
| Category | UI and Text |
Provides a control that draws a texture inside its rectangle.
public class Electron2D.TextureRect : Electron2D.ControlProfile: Electron2D 0.1.0 2D
Status: Supported / Parity verified
Out of profile: no
Godot reference: TextureRect
Texture display control with expand mode, stretch mode, horizontal/vertical flip and minimum-size behavior.
TextureRect stores a Electron2D.Texture2D and submits texture draw
commands according to Electron2D.TextureRect.StretchMode and Electron2D.TextureRect.ExpandMode.
This type is not synchronized. Create and mutate texture rectangles on the main scene thread.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.ControlElectron2D.Texture2D
| Member | Kind | Summary |
|---|---|---|
ExpandMode |
Property | Gets or sets how texture size affects minimum size. |
FlipH |
Property | Gets or sets whether the texture is flipped horizontally. |
FlipV |
Property | Gets or sets whether the texture is flipped vertically. |
StretchMode |
Property | Gets or sets how the texture is drawn. |
Texture |
Property | Gets or sets the texture drawn by this control. |
Electron2D.TextureRect() |
Constructor | Initializes a new instance of the Electron2D.TextureRect class. |
_Draw() |
Method | Draws the texture according to Electron2D.TextureRect.StretchMode. |
_GetMinimumSize() |
Method | Gets the minimum size requested by this texture rectangle. |
Kind: Property
public Electron2D.TextureRect.ExpandModeEnum ExpandMode { get; set; }Gets or sets how texture size affects minimum size.
The default is Electron2D.TextureRect.ExpandModeEnum.KeepSize.
The expand mode used by Electron2D.TextureRect._GetMinimumSize.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.TextureRect.ExpandModeEnum
Kind: Property
public System.Boolean FlipH { get; set; }Gets or sets whether the texture is flipped horizontally.
The flip flag is stored in the internal texture draw command.
true to request horizontal flip; otherwise, false.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.TextureRect.FlipV
Kind: Property
public System.Boolean FlipV { get; set; }Gets or sets whether the texture is flipped vertically.
The flip flag is stored in the internal texture draw command.
true to request vertical flip; otherwise, false.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.TextureRect.FlipH
Kind: Property
public Electron2D.TextureRect.StretchModeEnum StretchMode { get; set; }Gets or sets how the texture is drawn.
The default is Electron2D.TextureRect.StretchModeEnum.Scale.
The stretch mode used by Electron2D.TextureRect._Draw.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.TextureRect.StretchModeEnum
Kind: Property
public Electron2D.Texture2D Texture { get; set; }Gets or sets the texture drawn by this control.
Assigning this property queues a redraw.
The texture resource, or null to draw nothing.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Texture2D
Kind: Constructor
public Electron2D.TextureRect()Initializes a new instance of the Electron2D.TextureRect class.
The new control ignores mouse input by passing it through to controls below it.
This constructor is not synchronized. Call it from the main scene thread.
This constructor is available since Electron2D 0.1.0 Preview.
Electron2D.TextureRect
Kind: Method
public System.Void _Draw()()Draws the texture according to Electron2D.TextureRect.StretchMode.
No draw command is submitted when Electron2D.TextureRect.Texture is null.
This callback is invoked on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.CanvasItem.DrawTexture(Electron2D.Texture2D,Electron2D.Vector2,System.Nullable{Electron2D.Color})
Kind: Method
public Electron2D.Vector2 _GetMinimumSize()()Gets the minimum size requested by this texture rectangle.
When no texture is assigned, the minimum size is zero.
A size derived from Electron2D.TextureRect.Texture and Electron2D.TextureRect.ExpandMode.
This callback is invoked on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.TextureRect.ExpandMode
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.