Documentation ¶
Overview ¶
Package TextureRect provides methods for working with TextureRect object instances.
Index ¶
- type Advanced
- type Any
- type ExpandMode
- type Instance
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsControl() Control.Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AsTextureRect() Instance
- func (self Instance) ExpandMode() gdclass.TextureRectExpandMode
- func (self Instance) FlipH() bool
- func (self Instance) FlipV() bool
- func (self Instance) SetExpandMode(value gdclass.TextureRectExpandMode)
- func (self Instance) SetFlipH(value bool)
- func (self Instance) SetFlipV(value bool)
- func (self Instance) SetStretchMode(value gdclass.TextureRectStretchMode)
- func (self Instance) SetTexture(value [1]gdclass.Texture2D)
- func (self Instance) StretchMode() gdclass.TextureRectStretchMode
- func (self Instance) Texture() [1]gdclass.Texture2D
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- type StretchMode
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advanced ¶
type Advanced = class
Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.
type ExpandMode ¶
type ExpandMode = gdclass.TextureRectExpandMode //gd:TextureRect.ExpandMode
const ( /*The minimum size will be equal to texture size, i.e. [TextureRect] can't be smaller than the texture.*/ ExpandKeepSize ExpandMode = 0 /*The size of the texture won't be considered for minimum size calculation, so the [TextureRect] can be shrunk down past the texture size.*/ ExpandIgnoreSize ExpandMode = 1 /*The height of the texture will be ignored. Minimum width will be equal to the current height. Useful for horizontal layouts, e.g. inside [HBoxContainer].*/ ExpandFitWidth ExpandMode = 2 /*Same as [constant EXPAND_FIT_WIDTH], but keeps texture's aspect ratio.*/ ExpandFitWidthProportional ExpandMode = 3 /*The width of the texture will be ignored. Minimum height will be equal to the current width. Useful for vertical layouts, e.g. inside [VBoxContainer].*/ ExpandFitHeight ExpandMode = 4 /*Same as [constant EXPAND_FIT_HEIGHT], but keeps texture's aspect ratio.*/ ExpandFitHeightProportional ExpandMode = 5 )
type Instance ¶
type Instance [1]gdclass.TextureRect
A control that displays a texture, for example an icon inside a GUI. The texture's placement can be controlled with the [member stretch_mode] property. It can scale, tile, or stay centered inside its bounding rectangle.
var Nil Instance
Nil is a nil/null instance of the class. Equivalent to the zero value.
func (Instance) AsCanvasItem ¶
func (self Instance) AsCanvasItem() CanvasItem.Instance
func (Instance) AsTextureRect ¶
func (Instance) ExpandMode ¶
func (self Instance) ExpandMode() gdclass.TextureRectExpandMode
func (Instance) SetExpandMode ¶
func (self Instance) SetExpandMode(value gdclass.TextureRectExpandMode)
func (Instance) SetStretchMode ¶
func (self Instance) SetStretchMode(value gdclass.TextureRectStretchMode)
func (Instance) SetTexture ¶
func (Instance) StretchMode ¶
func (self Instance) StretchMode() gdclass.TextureRectStretchMode
func (*Instance) UnsafePointer ¶
type StretchMode ¶
type StretchMode = gdclass.TextureRectStretchMode //gd:TextureRect.StretchMode
const ( /*Scale to fit the node's bounding rectangle.*/ StretchScale StretchMode = 0 /*Tile inside the node's bounding rectangle.*/ StretchTile StretchMode = 1 /*The texture keeps its original size and stays in the bounding rectangle's top-left corner.*/ StretchKeep StretchMode = 2 /*The texture keeps its original size and stays centered in the node's bounding rectangle.*/ StretchKeepCentered StretchMode = 3 /*Scale the texture to fit the node's bounding rectangle, but maintain the texture's aspect ratio.*/ StretchKeepAspect StretchMode = 4 /*Scale the texture to fit the node's bounding rectangle, center it and maintain its aspect ratio.*/ StretchKeepAspectCentered StretchMode = 5 /*Scale the texture so that the shorter side fits the bounding rectangle. The other side clips to the node's limits.*/ StretchKeepAspectCovered StretchMode = 6 )
Click to show internal directories.
Click to hide internal directories.