# Text

class `Markup.Shapes.``Text`()

  This object represents markup text that is drawn on the canvas.

  ## Index

  Constructors

  - `constructor`

  Methods

  - `getFillColor`
  - `getFillOpacity`
  - `getFontFamily`
  - `getFontSize`
  - `getPosition`
  - `getStrokeColor`
  - `getStrokeWidth`
  - `getText`
  - `setFillColor`
  - `setFillOpacity`
  - `setFontFamily`
  - `setFontSize`
  - `setPosition`
  - `setStrokeColor`
  - `setStrokeWidth`
  - `setText`

## Constructors

`Markup.Shapes.Text.``constructor`()
  Text(text: string, position: `Point2`): `Text`

  Creates a new markup text item.

  Parameters

  > text: string

  > > the text associated with this item.

  > position: `Point2`

  > > the screen space point of the top left of the text string.

  Returns: `Text`

## Methods

`Markup.Shapes.Text.``getFillColor`()

  inherited

  getFillColor(): `Color`

  Gets the fill color for this shape

  Returns: `Color`

  > the fill color

`Markup.Shapes.Text.``getFillOpacity`()

  inherited

  getFillOpacity(): number

  Gets the fill opacity for this shape

  Returns: number

  > the fill opacity

`Markup.Shapes.Text.``getFontFamily`()

  inherited

  getFontFamily(): (None | string)

  Gets the font family for this text

  Returns: (None | string)

  > the font family

`Markup.Shapes.Text.``getFontSize`()

  inherited

  getFontSize(): number

  Gets the font size for this text

  Returns: number

  > the font size

`Markup.Shapes.Text.``getPosition`()
  getPosition(): `Point2`

  Gets the text position

  Returns: `Point2`

  > the text position

`Markup.Shapes.Text.``getStrokeColor`()

  inherited

  getStrokeColor(): `Color`

  Gets the stroke color for this shape

  Returns: `Color`

  > the stroke color

`Markup.Shapes.Text.``getStrokeWidth`()

  inherited

  getStrokeWidth(): number

  Gets the stroke width for this shape in pixels

  Returns: number

  > the stroke width in pixels

`Markup.Shapes.Text.``getText`()
  getText(): string

  Gets the text content

  Returns: string

  > the text content

`Markup.Shapes.Text.``setFillColor`()

  inherited

  setFillColor(color: `Color`): void

  Sets the fill color for this shape

  Parameters

  > color: `Color`

  > > the fill color

  Returns: void

`Markup.Shapes.Text.``setFillOpacity`()

  inherited

  setFillOpacity(fillOpacity: number): void

  Sets the fill opacity for this shape

  Parameters

  > fillOpacity: number

  > > the fill opacity

  Returns: void

`Markup.Shapes.Text.``setFontFamily`()

  inherited

  setFontFamily(fontFamily: string): void

  Sets the font family this shape

  Parameters

  > fontFamily: string

  > > font family to use for this text

  Returns: void

`Markup.Shapes.Text.``setFontSize`()

  inherited

  setFontSize(fontSize: number): void

  Sets the font size for this text

  Parameters

  > fontSize: number

  > > size to use for this text

  Returns: void

`Markup.Shapes.Text.``setPosition`()
  setPosition(position: `Point2`): void

  Sets the text position

  Parameters

  > position: `Point2`

  Returns: void

  > the top left position to render text from

`Markup.Shapes.Text.``setStrokeColor`()

  inherited

  setStrokeColor(color: `Color`): void

  Sets the stroke color for this shape

  Parameters

  > color: `Color`

  > > the stroke color

  Returns: void

`Markup.Shapes.Text.``setStrokeWidth`()

  inherited

  setStrokeWidth(strokeWidth: number): void

  Sets the stroke width for this shape in pixels

  Parameters

  > strokeWidth: number

  > > the stroke width in pixels

  Returns: void

`Markup.Shapes.Text.``setText`()
  setText(text: string): void

  Sets the text content

  Parameters

  > text: string

  > > the text to render

  Returns: void

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Visualize Web or choose a sample question below to start a conversation:

What is HOOPS Visualize Web?
What are the latest release notes for HOOPS Visualize Web?
How do I start evaluating HOOPS Visualize Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...