DgsCreateNineSlice

From Multi Theft Auto: Wiki
Revision as of 17:39, 20 February 2020 by Thisdp (talk | contribs) (Created page with "__NOTOC__ {{Client function}} This function creates a nine-slice scaler. ==Syntax== <syntaxhighlight lang="lua"> element dgsCreateNineSlice( element texture, float gridXLe...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function creates a nine-slice scaler.

Syntax

element dgsCreateNineSlice( element texture, float gridXLeft, float gridXRight, float gridYTop, float gridYBottom [, bool relative = true ] )

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

Returns

Returns a dgs-dxnineslice (DGS Plugin Type)[ shader (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.2, 0.35, 0.65 )
Image = DGS:dgsCreateImage( 100, 200, 500, 450, nSlice, false )

See Also

Custom Cursor Functions

Multi Language Supports

Animation

3D Element

3D Interface

3D Line

3D Image

3D Text

Browser

Button

Check Box

Combo Box

Custom Renderer

Edit

Detect Area

Drag'N Drop

Grid List

Image

Memo

Menu

Label

Layout

Line

Progress Bar

Radio Button

Scale Pane

Scroll Bar

Scroll Pane

Selector

Style

Switch Button

Tab Panel

Window

Basic Shape Plugins

Circle

Quadrilateral

Rounded Rectangle

Other Plugins

Blur Box

Canvas

Chart

Color Picker

Effect 3D

Gradient

Mask

Media Browser

Nine Slice

Object Preview Supports

Paste Handler

QRCode

Remote Image

Screen Source

SVG

Tooltips