Class: Base

DKTools.Base

Abstract base class for sprite and window

new DKTools.Base (object, y, width, height) abstract

Name Type Description
object Number | Graphics | Object | * optional The X coordinate or Graphics or object with parameters
y Number optional The Y coordinate (if object is Number)
width Number optional The width of the object (if object is Number)
height Number optional The height of the object (if object is Number)
object.x Number optional The X coordinate
object.y Number optional The Y coordinate
object.width Number optional The width of the object
object.height Number optional The height of the object

Members

eventsManager

Gets events manager
Since:
  • 9.0.0

mouse

Gets the coordinates of mouse inside the object
Since:
  • 8.0.0

mouseEnterTime

Gets time of mouse enter inside the object

touch

Gets the coordinates of touch inside the object
Since:
  • 9.0.0

wheelX

Gets number of pixels scrolling mouse on X axis

wheelY

Gets number of pixels scrolling mouse on Y axis

Methods

_clearAll () private

Clears all data
Version:
  • 9.2.0

_createEventsManager () private

Creates the event manager
Since:
  • 9.0.0

activate ()

Activates the object

actorName (n)String

Returns the name of the actor
Name Type Description
n Number Number of the actor
Returns:
Type Description
String Name of the actor

addAnimation (animation)DKTools.Animation

Adds the animation
Name Type Description
animation DKTools.Animation Animation to add
Version:
  • 10.0.0
Returns:
Type Description
DKTools.Animation Animation

addEvent (object)DKTools.Event

Adds the event
Name Type Description
object DKTools.Event | Object Event or object with parameters for the event
Name Type Description
id Number | String | * optional ID of the event
type String optional Type of the event
repeatTime Number optional Time of one repeat
repeats Number optional Amount of repeats
remainingPauseTime Number optional Remaining time of pause
onStart function optional Handler of the event start
onUpdate function optional Handler of the event update
onPause function optional Handler of the event pause
onReset function optional Handler of the event reset
onRepeat function optional Handler of the event repeat
onSuccess function optional Handler of the event success
onFail function optional Handler of the event fail
Version:
  • 6.0.0
Returns:
Type Description
DKTools.Event Added event
Examples
const sprite = new DKTools.Sprite();

sprite.addEvent({
     type: 'update',
     onUpdate: () => {
         // code
     }
});
const sprite = new DKTools.Sprite();

sprite.addEvent({
     type: 'update',
     repeats: 0,
     repeatTime: 60,
     onSuccess: () => {
         // code
     }
});

addFilter (filter)

Adds the filter
Name Type Description
filter * Filter
Since:
  • 6.2.0

addOneTimeEvent (object)DKTools.Event

Adds the one time event
Name Type Description
object DKTools.Event | Object Event or object with parameters for the event
Name Type Description
id Number | String | * optional ID of the event
type String optional Type of the event
remainingPauseTime Number optional Remaining time of pause
onStart function optional Handler of the event start
onUpdate function optional Handler of the event update
onPause function optional Handler of the event pause
onReset function optional Handler of the event reset
onRepeat function optional Handler of the event repeat
onSuccess function optional Handler of the event success
onFail function optional Handler of the event fail
Version:
  • 6.0.0
Returns:
Type Description
DKTools.Event Added event

calcTextHeight (textState, all)Number

Name Type Default Description
textState Object Text state
all Boolean false optional All lines
Returns:
Type Description
Number Text height

canRedrawAll ()Boolean

Returns true if the object can be updated and redrawn
Since:
  • 1.1.0
Returns:
Type Description
Boolean Object can be updated and redrawn

checkAll ()

Checks all
Version:
  • 10.0.0

clear ()Boolean

Clears the bitmap Returns true if successfully completed
Returns:
Type Description
Boolean Successfully completed

clearRect (object, y, width, height)Boolean

Clears a rectangle Returns true if successfully completed
Name Type Description
object Number | Rectangle | Object optional The X coordinate or Rectangle or object with parameters
y Number | String optional The Y coordinate or line number (String) (if object is Number)
width Number optional Width of the rectangle (if object is Number)
height Number | String optional Height of the rectangle or number of lines (String) (if object is Number)
object.x Number optional The X coordinate
object.y Number | String optional The Y coordinate or line number (String)
object.width Number optional Width of the rectangle
object.height Number | String optional Height of the rectangle or number of lines (String)
Version:
  • 6.0.0
Returns:
Type Description
Boolean Successfully completed

convertEscapeCharacters (text)String

Converts the escape characters Returns the text with converted the escaped characters
Name Type Description
text String Text
Returns:
Type Description
String Text with converted the escaped characters

createAll ()

Creates all objects
Version:
  • 2.0.0

deactivate ()

Deactivates the object

drawAll ()

Draws all
Version:
  • 10.0.0

drawBitmap (object, options)Boolean

Draws a bitmap Returns true if successfully completed
Name Type Default Description
object Bitmap | Object Bitmap or object with parameters
options Object {} optional Options for drawing
object.folder String Path to file
object.filename String Name of file
object.listener function optional Function of processing after loading a bitmap
object.hue Number optional Hue of bitmap
object.smooth Boolean optional Smooth of bitmap
options.sync Boolean optional Draw if the bitmap is ready
options.source function | Rectangle | Object optional Source from bitmap. Function or Rectangle or object with parameters
options.destination function | Rectangle | Object optional Destination to bitmap. Function or Rectangle or object with parameters
options.callback function optional Callback function, which should return an object with source and destination
options.paintOpacity Number optional Change paint opacity
options.resetPaintOpacity Boolean optional Reset paint opacity
options.source.x Number optional The X coordinate
options.source.y Number | String optional The Y coordinate or line number (String)
options.source.width Number optional Width of the rectangle
options.source.height Number | String optional Height of the rectangle or number of lines (String)
options.destination.x Number optional The X coordinate
options.destination.y Number | String optional The Y coordinate or line number (String)
options.destination.width Number optional Width of the rectangle
options.destination.height Number | String optional Height of the rectangle or number of lines (String)
Version:
  • 6.3.0
Returns:
Type Description
Boolean Successfully completed
Example
Drawing half of the bitmap

const sprite = new DKTools.Sprite(0, 0, 200, 200);

sprite.start();

sprite.drawBitmap({ folder: 'img/system/', filename: 'Window' }, {
     callback: function(bitmap, sprite) { // loaded bitmap, sprite
         return {
             source: {
                 width: bitmap.width / 2,
                 height: bitmap.height / 2
             }
         }
     }
});

drawBitmapAsync (object, options)Boolean async

Draws a bitmap Asynchronous version of DKTools.Base.prototype.drawBitmap Returns true if successfully completed
Name Type Default Description
object Bitmap | Object Bitmap or object with parameters
options Object {} optional Options for drawing
object.folder String Path to file
object.filename String Name of file
object.listener function optional Function of processing after loading a bitmap
object.hue Number optional Hue of bitmap
object.smooth Boolean optional Smooth of bitmap
options.source function | Rectangle | Object optional Source from bitmap. Function or Rectangle or object with parameters
options.destination function | Rectangle | Object optional Destination to bitmap. Function or Rectangle or object with parameters
options.callback function optional Callback function, which should return an object with source and destination
options.source.x Number optional The X coordinate
options.source.y Number | String optional The Y coordinate or line number (String)
options.source.width Number optional Width of the rectangle
options.source.height Number | String optional Height of the rectangle or number of lines (String)
options.destination.x Number optional The X coordinate
options.destination.y Number | String optional The Y coordinate or line number (String)
options.destination.width Number optional Width of the rectangle
options.destination.height Number | String optional Height of the rectangle or number of lines (String)
Version:
  • 6.0.0
Since:
  • 5.0.0
Returns:
Type Description
Boolean Successfully completed

drawCharacter (characterName, characterIndex, options)Boolean

Draws a character Returns true if successfully completed
Name Type Default Description
characterName String Character filename
characterIndex Number Character index
options Object {} optional Options for drawing
Name Type Description
x Number optional The X coordinate
y Number | String optional The Y coordinate or line number (String)
pos Point | Object optional Position for drawing (ignores other parameters of position: x, y)
paintOpacity Number optional Change paint opacity
resetPaintOpacity Boolean optional Reset paint opacity
pos.x Number optional The X coordinate
pos.y Number | String optional The Y coordinate or line number (String)
Version:
  • 6.0.0
Returns:
Type Description
Boolean Successfully completed

drawCircle (options)Boolean

Draws a circle Returns true if successfully completed
Name Type Default Description
options Object {} optional Options for drawing
Name Type Description
x Number optional The X coordinate
y Number | String optional The Y coordinate or line number (String)
pos Point | Object optional Position for drawing (ignores other parameters of position: x, y)
radius Number optional Radius of the circle
color String optional Color of the circle
paintOpacity Number optional Change paint opacity
resetPaintOpacity Boolean optional Reset paint opacity
pos.x Number optional The X coordinate
pos.y Number | String optional The Y coordinate or line number (String)
Version:
  • 6.3.0
Returns:
Type Description
Boolean Successfully completed

drawFace (faceName, faceIndex, options)Boolean

Draws a character face Returns true if successfully completed
Name Type Default Description
faceName String Face filename
faceIndex Number Face index
options Object {} optional Options for drawing
Name Type Description
x Number optional The X coordinate
y Number | String optional The Y coordinate or line number (String)
width Number optional Width of the face
height Number | String optional Height of the face or number of lines (String)
pos Point | Object optional Position for drawing (ignores other parameters of position: x, y)
rect Rectangle | Object optional Rectangle for drawing (ignores other parameters of position: x, y, pos)
paintOpacity Number optional Change paint opacity
resetPaintOpacity Boolean optional Reset paint opacity
pos.x Number optional The X coordinate
pos.y Number optional The Y coordinate or line number (String)
rect.x Number optional The X coordinate
rect.y Number | String optional The Y coordinate or line number (String)
rect.width Number optional Width of the face
rect.height Number | String optional Height of the face or number of lines (String)
Version:
  • 8.1.0
Returns:
Type Description
Boolean Successfully completed

drawGauge (options)Boolean

Draws a gauge Returns true if successfully completed
Name Type Default Description
options Object {} optional Options for drawing
Name Type Description
x Number optional The X coordinate
y Number | String optional The Y coordinate or line number (String)
width Number optional Width of the rectangle
height Number | String optional Height of the rectangle or number of lines (String)
pos Point | Object optional Position for drawing (ignores other parameters of position: x, y)
rect Rectangle | Object optional Rectangle for drawing (ignores other parameters of position: x, y, width, height, pos)
rate Number optional Gauge width rate
type String optional Gauge type (horizontal or vertical)
reversed Boolean optional Reversed gauge
gradient String optional Gradient type (horizontal or vertical)
backgroundColor String optional Background fill color
color String optional Fill color
color1 String optional First gradient color (ignores other parameters: color)
color2 String optional Second gradient color (ignores other parameters: color)
paintOpacity Number optional Change paint opacity
resetPaintOpacity Boolean optional Reset paint opacity
pos.x Number optional The X coordinate
pos.y Number | String optional The Y coordinate or line number (String)
rect.x Number optional The X coordinate
rect.y Number | String optional The Y coordinate or line number (String)
rect.width Number optional Width of the rectangle
rect.height Number | String optional Height of the rectangle or number of lines (String)
Since:
  • 6.3.0
Returns:
Type Description
Boolean Successfully completed

drawIcon (iconIndex, options)Boolean

Draws an icon Returns true if successfully completed
Name Type Default Description
iconIndex Number Icon index
options Object {} optional Options for drawing
Name Type Description
x Number optional The X coordinate
y Number | String optional The Y coordinate or line number (String)
pos Point | Object optional Position for drawing (ignores other parameters of position: x, y)
paintOpacity Number optional Change paint opacity
resetPaintOpacity Boolean optional Reset paint opacity
pos.x Number optional The X coordinate
pos.y Number | String optional The Y coordinate or line number (String)
Version:
  • 8.1.0
Returns:
Type Description
Boolean Successfully completed

drawItemName (item, options)Boolean

Draws a name of the item Returns true if successfully completed
Name Type Default Description
item Object Item
options Object {} optional Options for drawing
Name Type Description
x Number optional The X coordinate
y Number | String optional The Y coordinate or line number (String)
pos Point | Object optional Position for drawing (ignores other parameters of position: x, y)
iconX Number optional The X coordinate of the icon
iconY Number | String optional The Y coordinate of the icon or line number (String)
iconPos Point | Object optional Position of the icon (ignores other parameters of position: iconX, iconY)
width Number optional Width of the item name
paintOpacity Number optional Change paint opacity
resetPaintOpacity Boolean optional Reset paint opacity
pos.x Number optional The X coordinate
pos.y Number | String optional The Y coordinate or line number (String)
iconPos.x Number optional The X coordinate
iconPos.y Number | String optional The Y coordinate or line number (String)
Version:
  • 8.1.0
Returns:
Type Description
Boolean Successfully completed

drawLine (options)Boolean

Draws a line Returns true if successfully completed
Name Type Default Description
options Object 0 optional Options for drawing
Name Type Description
x1 Number optional The X coordinate of start of the line
y1 Number | String optional The Y coordinate of start of the line or line number (String)
x2 Number optional The X coordinate of end of the line
y2 Number | String optional The Y coordinate of end of the line or line number (String)
pos1 Point | Object optional Position for drawing (ignores other parameters of position: x1, y1)
pos2 Point | Object optional Position for drawing (ignores other parameters of position: x2, y2)
color String optional Line color
lineWidth Number optional Line width
paintOpacity Number optional Change paint opacity
resetPaintOpacity Boolean optional Reset paint opacity
pos1.x Number optional The X coordinate of start of the line
pos1.y Number | String optional The Y coordinate of start of the line or line number (String)
pos2.x Number optional The X coordinate of start of the line
pos2.y Number | String optional The Y coordinate of start of the line or line number (String)
Version:
  • 6.3.0
Returns:
Type Description
Boolean Successfully completed

drawPolygon (options)Boolean

Draws a polygon Returns true if successfully completed
Name Type Description
options Object Options for drawing
Name Type Description
points Array.<Point> | Array.<Object> optional Points or objects with parameters
color String optional Line color
lineWidth Number optional Line width
paintOpacity Number optional Change paint opacity
resetPaintOpacity Boolean optional Reset paint opacity
points[].x Number optional The X coordinate
points[].y Number | String optional The Y coordinate or line number (String)
Version:
  • 6.3.0
Since:
  • 5.0.0
Returns:
Type Description
Boolean Successfully completed

drawTextEx (text, options)Number

Draws a text (special characters are supported) Returns the width of the text
Name Type Default Description
text String Text
options Object {} optional Options for drawing
Name Type Description
wrap Object optional Options for text wrap
x Number optional The X coordinate
y Number | String optional The Y coordinate or line number (String)
pos Point | Object optional Position of the text (ignores other parameters of position: x, y)
index Number optional Index of the text
left Number optional Left padding
wrap.maxWidth Number optional Max width of a text line
wrap.maxLines Number optional Max lines
pos.x Number optional The X coordinate
pos.y Number | String optional The Y coordinate or line number (String)
Version:
  • 6.0.0
Returns:
Type Description
Number Width of the text

fillAll (color)Boolean

Fills the bitmap with color Returns true if successfully completed
Name Type Description
color String optional Color of fill
Returns:
Type Description
Boolean Successfully completed

fillRect (options)Boolean

Fills a rectangle with color Returns true if successfully completed
Name Type Default Description
options Object {} optional Parameters for drawing
Name Type Description
x Number optional The X coordinate
y Number | String optional The Y coordinate or line number (String)
width Number optional Width of the rectangle
height Number | String optional Height of the rectangle or number of lines (String)
pos Point | Object optional Position for drawing (ignores other parameters of position: x, y)
rect Rectangle | Object optional Rectangle for drawing (ignores other parameters of position: x, y, width, height, pos)
color String optional Fill color
paintOpacity Number optional Change paint opacity
resetPaintOpacity Boolean optional Reset paint opacity
pos.x Number optional The X coordinate
pos.y Number | String optional The Y coordinate or line number (String)
rect.x Number optional The X coordinate
rect.y Number | String optional The Y coordinate or line number (String)
rect.width Number optional Width of the rectangle
rect.height Number | String optional Height of the rectangle or number of lines (String)
Version:
  • 6.3.0
Returns:
Type Description
Boolean Successfully completed

fontHeight (lineHeight)Number

Returns the font height for the line height
Name Type Description
lineHeight Number optional Line height
Since:
  • 10.0.0
Returns:
Type Description
Number Font height for the line height

getLocalPoint (object, y)PIXI.Point

Returns the local point (coordinates inside the object)
Name Type Description
object Number | Point optional The X coordinate or Point
y Number optional The Y coordinate (if object is Number)
Version:
  • 10.0.1
Since:
  • 8.0.0
Returns:
Type Description
PIXI.Point Local point (coordinates inside the object)

getWindowskinTextColor (n)String

Returns the color from the window skin
Name Type Description
n Number Color number
Returns:
Type Description
String Color from the window skin

gradientFillAll (color1, color2, vertical)Boolean

Fills the bitmap with gradient Returns true if successfully completed
Name Type Default Description
color1 String 'black' optional First color
color2 String 'white' optional Second color
vertical Boolean false optional Vertical gradient
Version:
  • 6.0.0
Returns:
Type Description
Boolean Successfully completed

gradientFillRect (options)Boolean

Fills a rectangle with a gradient Returns true if successfully completed
Name Type Default Description
options Object {} optional Parameters for drawing
Name Type Description
color1 String optional First color
color2 String optional Second color
vertical Boolean optional Vertical gradient
x Number optional The X coordinate
y Number | String optional The Y coordinate or line number (String)
width Number optional Width of the rectangle
height Number | String optional Height of the rectangle or number of lines (String)
rect Rectangle optional Rectangle for drawing (ignores other parameters of position: x, y, width, height)
paintOpacity Number optional Change paint opacity
resetPaintOpacity Boolean optional Reset paint opacity
Version:
  • 6.3.0
Returns:
Type Description
Boolean Successfully completed

hasBitmap ()Boolean

Returns true if the object has the bitmap
Returns:
Type Description
Boolean Object has the bitmap

hasParent ()Boolean

Returns true if the object has a parent
Since:
  • 5.0.0
Returns:
Type Description
Boolean Object has a parent

hasWindowskin ()Boolean

Returns true if the object has the window skin
Returns:
Type Description
Boolean Object has the window skin

hide (blockDeactivate)

Hides the object
Name Type Default Description
blockDeactivate Boolean false optional Blocking deactivates of the object
Version:
  • 3.0.0

initialize (object, y, width, height)

Initializes a class object
Name Type Description
object Number | Object | * optional The X coordinate or Graphics or object with parameters
y Number optional The Y coordinate (if object is Number)
width Number optional The width of the object (if object is Number)
height Number | String optional The height of the object (if object is Number)
object.x Number optional The X coordinate
object.y Number optional The Y coordinate
object.width Number optional The width of the object
object.height Number | String optional The height of the object
Examples
const sprite = new DKTools.Sprite(0, 0, 100, 100);
=> x = 0; y = 0; width = 100; height = 100;
const sprite = new DKTools.Sprite(Graphics);
=> x = 0; y = 0; width = Graphics.boxWidth; height = Graphic.boxHeight;
const sprite = new DKTools.Sprite({ x: 0, y: 0, width: 100, height: 100 });
=> x = 0; y = 0; width = 100; height = 100;

isActive ()Boolean

Returns true if the object is active
Returns:
Type Description
Boolean Object is active

isBusy ()Boolean

Returns true if the object is busy
Returns:
Type Description
Boolean Object is busy

isChild (object)Boolean

Returns true if the object has a parent (if parameter is null or undefined) Returns true if the object (parameter) is child of this object
Name Type Description
object Sprite | Window optional Object
Version:
  • 10.0.0
Returns:
Type Description
Boolean Object (parameter) is child of this object or object has a parent (if parameter is null or undefined)

isDestroyed ()Boolean

Returns true if the object was destroyed
Since:
  • 8.0.0
Returns:
Type Description
Boolean Object was destroyed

isInside (x, y)Boolean

Returns true if the coordinates is inside the object
Name Type Description
x Number The X coordinate
y Number The Y coordinate
Version:
  • 8.0.0
Returns:
Type Description
Boolean Coordinates is inside the object

isMouseInside ()Boolean

Returns true if the mouse is inside the object
Returns:
Type Description
Boolean Mouse is inside the object

isOutside (x, y)Boolean

Returns true if the coordinates is not inside the object
Name Type Description
x Number The X coordinate
y Number The Y coordinate
Returns:
Type Description
Boolean Coordinates are not inside the object

isParent (object)Boolean

Returns true if the object (parameter) is parent of this object
Name Type Description
object Sprite | Window Object
Since:
  • 2.0.0
Returns:
Type Description
Boolean Object (parameter) is parent of this object

isReady ()Boolean

Returns true if the bitmap is ready
Returns:
Type Description
Boolean Bitmap is ready

isStarted ()Boolean

Returns true if the object is started
Returns:
Type Description
Boolean Object is started

isTouchInside ()Boolean

Returns true if the touch is inside the object
Version:
  • 10.0.6
Returns:
Type Description
Boolean Touch is inside the object

isVisible ()Boolean

Returns true if the object is visible
Version:
  • 2.0.0
Returns:
Type Description
Boolean Object is visible

isVisibleAndActive ()Boolean

Returns true if the object is visible and active
Returns:
Type Description
Boolean Object is visible and active

makeFontBigger ()

Makes the font size bigger

makeFontSmaller ()

Makes the font size smaller

move (x, y)

Moves the object
Name Type Description
x Number optional The X coordinate
y Number | String optional The Y coordinate or line number (String)
Version:
  • 10.0.0
Examples
const sprite = new DKTools.Sprite();
sprite.move(100, 100);
const sprite = new DKTools.Sprite();
sprite.move(100, '2');

obtainEscapeCode (textState)String

Name Type Description
textState Object
Returns:
Type Description
String

obtainEscapeParam (textState)Number | String

Name Type Description
textState Object
Returns:
Type Description
Number | String

onItemChange (item, lastItem)

Handles item change
Name Type Description
item * Item
lastItem * Last item
Since:
  • 11.1.0

partyMemberName (n)String | null

Returns the name of the actor
Name Type Description
n Number Number of the actor in the party
Returns:
Type Description
String | null Name of the actor

processAll ()

Processes all
Version:
  • 9.1.0

processCharacter (textState)

Name Type Description
textState Object

processDrawIcon (iconIndex, textState)

Name Type Description
iconIndex Number
textState Object
Version:
  • 8.1.0

processEscapeCharacter (code, textState)

Name Type Description
code String
textState Object
Version:
  • 8.2.0

processMouseEvents ()

Processes a mouse
Version:
  • 10.0.0
Since:
  • 2.0.0

processNewLine (textState)

Name Type Description
textState Object

processNewPage (textState)

Name Type Description
textState Object

processNormalCharacter (textState)

Name Type Description
textState Object Text state

processWheelEvents ()

Processes a wheel
Since:
  • 2.0.0

redrawAll ()

Redraws all
Version:
  • 10.0.0

refreshAll ()

Updates and redraws all
Version:
  • 1.1.0

removeAll ()

Removes all
Version:
  • 2.0.0

removeEvent (event)Boolean

Removes the event from a container Returns true if the event was removed
Name Type Description
event DKTools.Event | DKTools.Animation Event
Version:
  • 2.0.0
Returns:
Type Description
Boolean Event was removed

removeFilter (filter)

Removes the filter
Name Type Description
filter * Filter

removeFromParent ()Boolean

Removes the object from the parent object, if possible Returns true if the deletion was successful
Since:
  • 5.0.0
Returns:
Type Description
Boolean Deletion was successful

resize (width, height, blockStart)Boolean

Changes the width and height of the object Returns true if the change occurred
Name Type Default Description
width Number Width of the object
height Number | String Height of the object or number of lines (String)
blockStart Boolean false optional Blocking the call of the "start" function
Since:
  • 10.0.0
Returns:
Type Description
Boolean Change occurred

setActive (active)Boolean

Changes the activity of the object Returns true if the change occurred
Name Type Description
active Boolean optional Activity of the object
Returns:
Type Description
Boolean Change occurred

setItem (item, blockStart)

Sets the item
Name Type Default Description
item * Item
blockStart Boolean false optional Blocking the call of the "start" function
Since:
  • 11.1.0

setupActive (active)

Sets the activity of the object
Name Type Description
active Boolean optional Activity of the object

setupAll (object)

Sets all parameters
Name Type Default Description
object Object {} optional Parameters
Name Type Description
visible Boolean optional Visibility of the object
active Boolean optional Activity of the object
scale Point | Object optional Scale of the object
pivot Point | Object optional Pivot of the object
skew Point | Object optional Skew of the object
rotation Number optional Rotation of the object
opacity Number optional Opacity of the object
Version:
  • 10.0.1

setupOpacity (opacity)

Sets the opacity of the object
Name Type Description
opacity Number optional Opacity of the object
Since:
  • 10.0.0

setupPivot (object, y)

Sets the pivot of the object
Name Type Description
object Number | Point optional The X coordinate or Point
y Number optional The Y coordinate (if object is Number)
Version:
  • 10.0.0

setupRotation (rotation)

Sets the rotation of the object
Name Type Description
rotation Number optional Rotation of the object

setupScale (object, y)

Sets the scale of the object
Name Type Description
object Number | Point optional The X coordinate or Point
y Number optional The Y coordinate (if object is Number)
Version:
  • 10.0.0

setupSize (object, height)

Sets the size of the object
Name Type Description
object Number | Object optional Width of the object or object with parameters
height Number optional Height of the object (if object is Object)
object.width Number optional Width of the object
object.height Number optional Height of the object

setupSkew (object, y)

Sets the skew of the object
Name Type Description
object Number | Point optional The X coordinate or Point
y Number optional The Y coordinate (if object is Number)
Version:
  • 10.0.0

setupVisible (visible)

Sets the visibility of the object
Name Type Description
visible Boolean optional Visibility of the object

setVisible (visible)Boolean

Changes the visibility of the object Returns true if the change occurred
Name Type Description
visible Boolean optional Visibility of the object
Returns:
Type Description
Boolean Change occurred

show (activate)

Shows the object
Name Type Default Description
activate Boolean false optional Activates the object
Version:
  • 3.0.0

standardActive ()Boolean

Returns the standard activity of the object
Returns:
Type Description
Boolean Standard activity of the object

standardDrawingHeight ()Number

Returns the standard height of the drawing
Version:
  • 8.0.0
Returns:
Type Description
Number Standard height of the drawing or null

standardDrawingWidth ()Number

Returns the standard width of the drawing
Version:
  • 8.0.0
Returns:
Type Description
Number Standard width of the drawing or null

standardOpacity ()Number

Returns the standard opacity of the object
Since:
  • 10.0.0
Returns:
Type Description
Number Standard opacity of the object

standardPivot ()Point

Returns the standard pivot of the object
Returns:
Type Description
Point Standard pivot of the object

standardRotation ()Number

Returns the standard rotation of the object
Returns:
Type Description
Number Standard rotation of the object

standardScale ()Point

Returns the standard scale of the object
Returns:
Type Description
Point Standard scale of the object

standardSkew ()Point

Returns the standard skew of the object
Returns:
Type Description
Point Standard skew of the object

standardVisible ()Boolean

Returns the standard visibility of the object
Returns:
Type Description
Boolean Standard visibility of the object

standardWindowskin ()String

Returns the standard window skin
Returns:
Type Description
String Standard window skin

start (activate)

Starts the object
Name Type Default Description
activate Boolean false optional Activates the object
Version:
  • 10.0.0

textFontHeight (text, wrap)Number

Returns the height of the text (taking into account the font)
Name Type Default Description
text String | Number Text
wrap Object {} optional Wrap options
Name Type Description
maxWidth Number optional Max width of a text line
maxLines Number optional Max lines
Since:
  • 10.0.0
Returns:
Type Description
Number Height of the text (taking into account the font)

textHeight (text, wrap)Number

Returns the height of the text
Name Type Default Description
text String | Number Text
wrap Object {} optional Wrap options
Name Type Description
maxWidth Number optional Max width of a text line
maxLines Number optional Max lines
Since:
  • 10.0.0
Returns:
Type Description
Number Height of the text

textHeightEx (text, options)Number

Returns the height of the text (special characters are supported)
Name Type Default Description
text String Text
options Object {} optional Options for drawing
Name Type Description
wrap Object optional Wrap options
Name Type Description
maxWidth Number optional Max width of a text line
maxLines Number optional Max lines
Since:
  • 10.0.0
Returns:
Type Description
Number Height of the text

textLines (text, wrap)Number

Returns the number of lines of the text
Name Type Description
text String | Number Text
wrap Object optional Wrap options
Name Type Description
maxWidth Number optional Max width of a text line
maxLines Number optional Max lines
Returns:
Type Description
Number Number of lines of the text

textWidth (text)Number

Returns the width of the text
Name Type Description
text String Text
Since:
  • 10.0.0
Returns:
Type Description
Number Width of the text

textWidthEx (text, options)Number

Returns the width of the text (special characters are supported)
Name Type Default Description
text String Text
options Object {} optional Options for drawing
Since:
  • 10.0.0
Returns:
Type Description
Number Width of the text

textWrap (text, options)String

Makes a text wrap
Name Type Default Description
text String Text
options Object {} optional Wrap options
Name Type Description
maxWidth Number optional Max width of a text line
maxLines Number optional Max lines
Version:
  • 10.0.0
Returns:
Type Description
String Wrapped text

update ()

Updates the object
Version:
  • 10.0.0

updateActivateEvents ()

Updates the events with type: activate

updateAll ()

Updates all
Version:
  • 10.0.0

updateCheckAllEvents ()

Updates the events with type: check-all
Version:
  • 2.0.0

updateChildren ()

Updates the child objects

updateCreateAllEvents ()

Updates the events with type: create-all
Version:
  • 2.0.0

updateDeactivateEvents ()

Updates the events with type: deactivate

updateDrawAllEvents ()

Updates the events with type: draw-all
Since:
  • 10.0.0

updateEvents ()

Updates the events
Version:
  • 2.0.0

updateHideEvents ()

Updates the events with type: hide

updateMouseEnterEvents ()

Updates the events with type: mouse-enter
Version:
  • 2.0.0

updateMouseInsideEvents ()

Updates the events with type: mouse-inside
Since:
  • 2.0.0

updateMouseLeaveEvents ()

Updates the events with type: mouse-leave
Version:
  • 2.0.0

updateMouseMoveEvents ()

Updates the events with type: mouse-move
Since:
  • 2.0.0

updateMouseOutsideEvents ()

Updates the events with type: mouse-outside
Since:
  • 2.0.0

updateQueueEvents ()

Updates the events with type: queue

updateReadyEvents ()

Updates the events with type: ready

updateRedrawAllEvents ()

Updates the events with type: redraw-all
Version:
  • 2.0.0

updateRefreshAllEvents ()

Updates the events with type: refresh-all
Version:
  • 2.0.0

updateRemoveAllEvents ()

Updates the events with type: remove-all
Version:
  • 2.0.0

updateShowEvents ()

Updates the events with type: show

updateStartEvents ()

Updates the events with type: start

updateUpdateAllEvents ()

Updates the events with type: update-all
Version:
  • 2.0.0

updateUpdateEvents ()

Updates the events with type: update

updateWheelXEvents (type)

Updates the events with type: wheel-X-inside or wheel-X-outside
Name Type Description
type String Type of the wheel event (inside or outside)
Version:
  • 2.0.0

updateWheelYEvents (type)

Updates the events with type: wheel-Y-inside or wheel-Y-outside
Name Type Description
type String Type of the wheel event (inside or outside)
Version:
  • 2.0.0