DgsCreateNineSlice

From Multi Theft Auto: Wiki

This function creates a nine-slice scaler.

Syntax

element dgsCreateNineSlice( element texture, float gridXLeft, float gridXRight, float gridYTop, float gridYBottom [, bool relative = false ] )
Nine Slice Scaling

Required Arguments

  • texture: A texture element that you want to scale.
  • gridXLeft: A float of the position of left grid, depends of by relative
  • gridXRight: A float of the position of right grid, depends of by relative
  • gridYTop: A float of the position of top grid, depends of by relative
  • gridYBottom: A float of the position of bottom grid, depends of by relative

Optional Arguments

  • relative: A bool of whether the position of grid is ranging from 0 to 1 or just absolute pixels

Returns

Returns a dgs-dxnineslice (DGS Plugin Type)[ dgs-dxcustomrenderer(Element Type) ] if succeed, false otherwise

Example

DGS = exports.dgs --get exported functions from dgs

yourTexture = dxCreateTexture("yourTexture")
nSlice = DGS:dgsCreateNineSlice( yourTexture, 0.2, 0.35, 0.2, 0.65, true )
Image = DGS:dgsCreateImage( 100, 200, 500, 450, nSlice, false )

See Also

Multi Language Supports

Animation

3D Interface

3D Text

Browser

Button

Check Box

Combo Box

Custom Renderer

Edit

Detect Area

Grid List

Image

Memo

Label

Progress Bar

Radio Button

Scroll Bar

Scroll Pane

Selector

Switch Button

Tab Panel

Window

Plugin

Blur Box

Color Picker

Canvas

Effect 3D

Media Browser

Mask

Nine Slice

Object Preview Supports

Paste Handler

QRCode

Remote Image

Rounded Rectangle