Documentation ¶
Overview ¶
Package NinePatchRect provides methods for working with NinePatchRect object instances.
Index ¶
- type Advanced
- type Any
- type AxisStretchMode
- type Instance
- func (self Instance) AsCanvasItem() CanvasItem.Instance
- func (self Instance) AsControl() Control.Instance
- func (self Instance) AsNinePatchRect() Instance
- func (self Instance) AsNode() Node.Instance
- func (self Instance) AsObject() [1]gd.Object
- func (self Instance) AxisStretchHorizontal() gdclass.NinePatchRectAxisStretchMode
- func (self Instance) AxisStretchVertical() gdclass.NinePatchRectAxisStretchMode
- func (self Instance) DrawCenter() bool
- func (self Instance) OnTextureChanged(cb func())
- func (self Instance) PatchMarginBottom() int
- func (self Instance) PatchMarginLeft() int
- func (self Instance) PatchMarginRight() int
- func (self Instance) PatchMarginTop() int
- func (self Instance) RegionRect() Rect2.PositionSize
- func (self Instance) SetAxisStretchHorizontal(value gdclass.NinePatchRectAxisStretchMode)
- func (self Instance) SetAxisStretchVertical(value gdclass.NinePatchRectAxisStretchMode)
- func (self Instance) SetDrawCenter(value bool)
- func (self Instance) SetPatchMarginBottom(value int)
- func (self Instance) SetPatchMarginLeft(value int)
- func (self Instance) SetPatchMarginRight(value int)
- func (self Instance) SetPatchMarginTop(value int)
- func (self Instance) SetRegionRect(value Rect2.PositionSize)
- func (self Instance) SetTexture(value [1]gdclass.Texture2D)
- func (self Instance) Texture() [1]gdclass.Texture2D
- func (self *Instance) UnsafePointer() unsafe.Pointer
- func (self Instance) Virtual(name string) reflect.Value
- type Side
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 AxisStretchMode ¶
type AxisStretchMode = gdclass.NinePatchRectAxisStretchMode //gd:NinePatchRect.AxisStretchMode
const ( /*Stretches the center texture across the NinePatchRect. This may cause the texture to be distorted.*/ AxisStretchModeStretch AxisStretchMode = 0 /*Repeats the center texture across the NinePatchRect. This won't cause any visible distortion. The texture must be seamless for this to work without displaying artifacts between edges.*/ AxisStretchModeTile AxisStretchMode = 1 /*Repeats the center texture across the NinePatchRect, but will also stretch the texture to make sure each tile is visible in full. This may cause the texture to be distorted, but less than [constant AXIS_STRETCH_MODE_STRETCH]. The texture must be seamless for this to work without displaying artifacts between edges.*/ AxisStretchModeTileFit AxisStretchMode = 2 )
type Instance ¶
type Instance [1]gdclass.NinePatchRect
Also known as 9-slice panels, [NinePatchRect] produces clean panels of any size based on a small texture. To do so, it splits the texture in a 3×3 grid. When you scale the node, it tiles the texture's edges horizontally or vertically, tiles the center on both axes, and leaves the corners unchanged.
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) AsNinePatchRect ¶
func (Instance) AxisStretchHorizontal ¶
func (self Instance) AxisStretchHorizontal() gdclass.NinePatchRectAxisStretchMode
func (Instance) AxisStretchVertical ¶
func (self Instance) AxisStretchVertical() gdclass.NinePatchRectAxisStretchMode
func (Instance) DrawCenter ¶
func (Instance) OnTextureChanged ¶
func (self Instance) OnTextureChanged(cb func())
func (Instance) PatchMarginBottom ¶
func (Instance) PatchMarginLeft ¶
func (Instance) PatchMarginRight ¶
func (Instance) PatchMarginTop ¶
func (Instance) RegionRect ¶
func (self Instance) RegionRect() Rect2.PositionSize
func (Instance) SetAxisStretchHorizontal ¶
func (self Instance) SetAxisStretchHorizontal(value gdclass.NinePatchRectAxisStretchMode)
func (Instance) SetAxisStretchVertical ¶
func (self Instance) SetAxisStretchVertical(value gdclass.NinePatchRectAxisStretchMode)
func (Instance) SetDrawCenter ¶
func (Instance) SetPatchMarginBottom ¶
func (Instance) SetPatchMarginLeft ¶
func (Instance) SetPatchMarginRight ¶
func (Instance) SetPatchMarginTop ¶
func (Instance) SetRegionRect ¶
func (self Instance) SetRegionRect(value Rect2.PositionSize)
func (Instance) SetTexture ¶
func (*Instance) UnsafePointer ¶
type Side ¶
type Side int
const ( /*Left side, usually used for [Control] or [StyleBox]-derived classes.*/ SideLeft Side = 0 /*Top side, usually used for [Control] or [StyleBox]-derived classes.*/ SideTop Side = 1 /*Right side, usually used for [Control] or [StyleBox]-derived classes.*/ SideRight Side = 2 /*Bottom side, usually used for [Control] or [StyleBox]-derived classes.*/ SideBottom Side = 3 )
Click to show internal directories.
Click to hide internal directories.