new PhotoEditorSDK.Operations.SpriteOperation.Text(operation, options)
sdk/operations/sprites/text.js, line 25
Creates a new Text
Name | Type | Description |
---|---|---|
operation |
PhotoEditorSDK.Operations.SpriteOperation | |
options |
Object | optional |
Methods
-
applyCrop(cropOperation, options)
sdk/operations/sprites/text.js, line 108 -
Applies a crop with the given options
Name Type Description cropOperation
PhotoEditorSDK.Operations.CropOperation options
Object -
applyFlip(direction)
sdk/operations/sprites/text.js, line 87 -
Applies a flip in the given direction
Name Type Description direction
String -
applyRotation(degrees)
sdk/operations/sprites/text.js, line 123 -
Applies a rotation with the given degrees
Name Type Description degrees
Number -
dispose()
sdk/operations/sprites/text.js, line 170 -
Cleans up this Sprite
-
getAlignment(){undefined}
-
Returns the alignment
Returns:
Name Type Description alignment
undefined The alignment -
getAnchor(){undefined}
-
Returns the anchor
Returns:
Name Type Description anchor
undefined The anchor -
getBackgroundColor(){undefined}
-
Returns the backgroundColor
Returns:
Name Type Description backgroundColor
undefined The backgroundColor -
getBoundingBox(sdk, inputDimensions){PhotoEditorSDK.Math.Vector2}
sdk/operations/sprites/text.js, line 79 -
Returns the bounding box for this text
Name Type Description sdk
PhotoEditorSDK inputDimensions
PhotoEditorSDK.Math.Vector2 Returns:
Type Description PhotoEditorSDK.Math.Vector2 -
getColor(){undefined}
-
Returns the color
Returns:
Name Type Description color
undefined The color -
getDOMStyle(SDK, inputDimensions){Object}
sdk/operations/sprites/text.js, line 57 -
Returns a style object for this text
Name Type Description SDK
PhotoEditorSDK inputDimensions
PhotoEditorSDK.Math.Vector2 Returns:
Type Description Object -
getFontFamily(){undefined}
-
Returns the fontFamily
Returns:
Name Type Description fontFamily
undefined The fontFamily -
getFontSize(){undefined}
-
Returns the fontSize
Returns:
Name Type Description fontSize
undefined The fontSize -
getFontStyle(){undefined}
-
Returns the fontStyle
Returns:
Name Type Description fontStyle
undefined The fontStyle -
getFontWeight(){undefined}
-
Returns the fontWeight
Returns:
Name Type Description fontWeight
undefined The fontWeight -
getId(){undefined}
-
Returns the id
Returns:
Name Type Description id
undefined The id -
getLineHeight(){undefined}
-
Returns the lineHeight
Returns:
Name Type Description lineHeight
undefined The lineHeight -
getMaxHeight(){undefined}
-
Returns the maxHeight
Returns:
Name Type Description maxHeight
undefined The maxHeight -
getMaxWidth(){undefined}
-
Returns the maxWidth
Returns:
Name Type Description maxWidth
undefined The maxWidth -
getOutlineColor(){undefined}
-
Returns the outlineColor
Returns:
Name Type Description outlineColor
undefined The outlineColor -
getOutlineWidth(){undefined}
-
Returns the outlineWidth
Returns:
Name Type Description outlineWidth
undefined The outlineWidth -
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 -
getText(){undefined}
-
Returns the text
Returns:
Name Type Description text
undefined The text -
getVerticalAlignment(){undefined}
-
Returns the verticalAlignment
Returns:
Name Type Description verticalAlignment
undefined The verticalAlignment -
serializeOptions(keys, toObject){Object}
sdk/operations/sprites/text.js, line 44 -
Returns a serialized version of this configurable
Name Type Default Description keys
Array.<String> toObject
Boolean false = false
Returns:
Type Description Object -
setAlignment(alignment)
-
Sets the alignment
Name Type Description alignment
undefined -
setAnchor(anchor)
-
Sets the anchor
Name Type Description anchor
undefined -
setBackgroundColor(backgroundColor)
-
Sets the backgroundColor
Name Type Description backgroundColor
undefined -
setColor(color)
-
Sets the color
Name Type Description color
undefined -
setFontFamily(fontFamily)
-
Sets the fontFamily
Name Type Description fontFamily
undefined -
setFontSize(fontSize)
-
Sets the fontSize
Name Type Description fontSize
undefined -
setFontStyle(fontStyle)
-
Sets the fontStyle
Name Type Description fontStyle
undefined -
setFontWeight(fontWeight)
-
Sets the fontWeight
Name Type Description fontWeight
undefined -
setId(id)
-
Sets the id
Name Type Description id
undefined -
setLineHeight(lineHeight)
-
Sets the lineHeight
Name Type Description lineHeight
undefined -
setMaxHeight(maxHeight)
-
Sets the maxHeight
Name Type Description maxHeight
undefined -
setMaxWidth(maxWidth)
-
Sets the maxWidth
Name Type Description maxWidth
undefined -
setOutlineColor(outlineColor)
-
Sets the outlineColor
Name Type Description outlineColor
undefined -
setOutlineWidth(outlineWidth)
-
Sets the outlineWidth
Name Type Description outlineWidth
undefined -
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 -
setText(text)
-
Sets the text
Name Type Description text
undefined -
setVerticalAlignment(verticalAlignment)
-
Sets the verticalAlignment
Name Type Description verticalAlignment
undefined -
update(sdk, inputDimensions){Promise}
sdk/operations/sprites/text.js, line 137 -
Updates this sprite
Name Type Description sdk
PhotoEditorSDK inputDimensions
PhotoEditorSDK.Math.Vector2 Returns:
Type Description Promise