Class: PostcardTextObject

PostcardTextObject

new PostcardTextObject(text, ctx, options)

Represents an internal object that deals with images
Parameters:
Name Type Argument Description
text String actual text value
ctx CanvasRenderingContext2D context in which to draw the object
options Object <optional>
Defines placement and content.
Source:

Extends

Methods

changeText(newText)

Update the TextObject with a new text value
Parameters:
Name Type Description
newText String the new text
Source:

contains() → {Boolean}

Contains method for ImageObject. Necessary because y starts at the bottom left
Source:
Returns:
if the coordinate is within the object's bounds
Type
Boolean

draw()

Draw method for the text object
Source:

getFont()

Formats the font options into the string thats recognized by ctx.font Format: "style weight size family"
Source:

hide()

Set opacity on the PostcardObject to 0.0
Inherited From:
Source:

setFont()

Allows for styling to be set via string, a la CSS NOTE: relies on "px" being part of the font size declaration Format: "hex style weight size family"
Source:

show()

Set opacity on the PostcardObject to 1.0
Inherited From:
Source:

update(newOptions)

Generic update method for PostcardObject.
Parameters:
Name Type Description
newOptions Object any options to update
Source: