Class: Sticker

PhotoEditorSDK.Operations.SpriteOperation. Sticker

A sticker that can be drawn by SpriteOperation. Should only be created via PhotoEditorSDK.Operations.SpriteOperation#createSticker

new PhotoEditorSDK.Operations.SpriteOperation.Sticker(operation, options)

sdk/operations/sprites/sticker.js, line 25

Creates a new Sticker

Name Type Description
operation PhotoEditorSDK.Operations.SpriteOperation
options Object optional

Methods

applyFlip(direction)

sdk/operations/sprites/sticker.js, line 140

Applies a flip in the given direction

Name Type Description
direction String

dispose()

sdk/operations/sprites/sticker.js, line 215

Disposes this sprite

getAdjustments(){undefined}

Returns the adjustments
Returns:
Name Type Description
adjustments undefined The adjustments

getAnchor(){undefined}

Returns the anchor
Returns:
Name Type Description
anchor undefined The anchor

getDimensions(){undefined}

Returns the dimensions
Returns:
Name Type Description
dimensions undefined The dimensions

getFlipHorizontally(){undefined}

Returns the flipHorizontally
Returns:
Name Type Description
flipHorizontally undefined The flipHorizontally

getFlipVertically(){undefined}

Returns the flipVertically
Returns:
Name Type Description
flipVertically undefined The flipVertically

getId(){undefined}

Returns the id
Returns:
Name Type Description
id undefined The id

getImage(){undefined}

Returns the image
Returns:
Name Type Description
image undefined The image

getName(){undefined}

Returns the name
Returns:
Name Type Description
name undefined The name

getPivot(){undefined}

Returns the pivot
Returns:
Name Type Description
pivot undefined The pivot

getPosition(){undefined}

Returns the position
Returns:
Name Type Description
position undefined The position

getRotation(){undefined}

Returns the rotation
Returns:
Name Type Description
rotation undefined The rotation

getSmoothDownscaling(){undefined}

Returns the smoothDownscaling
Returns:
Name Type Description
smoothDownscaling undefined The smoothDownscaling

serializeOptions(keys, toObject){Object}

sdk/operations/sprites/sticker.js, line 50

Returns a serialized version of this configurable

Name Type Default Description
keys Array.<String>
toObject Boolean false

= false

Returns:
Type Description
Object

setAdjustments(adjustments)

Sets the adjustments
Name Type Description
adjustments undefined

setAnchor(anchor)

Sets the anchor
Name Type Description
anchor undefined

setDimensions(dimensions)

Sets the dimensions
Name Type Description
dimensions undefined

setFlipHorizontally(flipHorizontally)

Sets the flipHorizontally
Name Type Description
flipHorizontally undefined

setFlipVertically(flipVertically)

Sets the flipVertically
Name Type Description
flipVertically undefined

setId(id)

Sets the id
Name Type Description
id undefined

setImage(image)

Sets the image
Name Type Description
image undefined

setName(name)

Sets the name
Name Type Description
name undefined

setOption(optionName, value, update)

sdk/operations/sprites/sticker.js, line 193

Sets the value for the given option, validates it

Name Type Default Description
optionName String
value *
update Boolean true

= true

setPivot(pivot)

Sets the pivot
Name Type Description
pivot undefined

setPosition(position)

Sets the position
Name Type Description
position undefined

setRotation(rotation)

Sets the rotation
Name Type Description
rotation undefined

setSmoothDownscaling(smoothDownscaling)

Sets the smoothDownscaling
Name Type Description
smoothDownscaling undefined

update(sdk, inputDimensions){Promise}

sdk/operations/sprites/sticker.js, line 84

Updates this sprite

Name Type Description
sdk PhotoEditorSDK
inputDimensions PhotoEditorSDK.Math.Vector2
Returns:
Type Description
Promise