Class: Text

olympe.ui.vectorial. Text

Text element


new Text()

Creates a Text Element.

Extends

Members


<protected> fontFamily :olympe.df.POString

Type:
Inherited From:
Overrides:

<protected> fontSize :olympe.df.PONumber

Type:
Inherited From:
Overrides:

<protected> fontWeight :olympe.df.PONumber

Type:
Inherited From:
Overrides:

<protected> hAlign :olympe.df.POString

Type:
Inherited From:
Overrides:

<protected> text :olympe.df.POString

Type:
Inherited From:
Overrides:

Methods


getDimension()

Gets the text dimensions

Inherited From:
Overrides:
Returns:
Type
olympe.df.Vector2

<protected> getGestureEvent()

Gets the gesture event manager attached to this element

Inherited From:
Overrides:
Returns:
Type
olympe.ui.events.GestureEventManager

<protected> getMouseEvent()

Gets the mouse event manager attached to this element

Inherited From:
Overrides:
Returns:
Type
olympe.ui.events.MouseEventManager

getPosition()

Gets the position of this element

Inherited From:
Overrides:
Returns:
Type
olympe.df.PVector2

getScale()

Gets the scale of this element

Inherited From:
Overrides:
Returns:
Type
olympe.df.PONumber

getText()

Gets the text value

Inherited From:
Overrides:
Returns:
Type
olympe.df.POString

<protected> getUIProxyBoxElement()

Inherited From:
Overrides:
Returns:
Type
olympe.uiapi.vectorial.BoxElement

getUIProxyGraphicsElement()

Get the UI proxy object. This method needs to be public for the SvgContainer to be able to access it.

Inherited From:
Overrides:
Returns:

Proxified box element

Type
olympe.uiapi.vectorial.GraphicsElement

<protected> getUIProxySvgElement()

Inherited From:
Overrides:
Returns:
Type
olympe.uiapi.vectorial.SvgElement

<protected> getUIProxyText()

Inherited From:
Overrides:
Returns:
Type
olympe.uiapi.vectorial.Text

isHidden()

Inherited From:
Overrides:
Returns:
Type
olympe.df.POBoolean

removeTooltip()

Removes the tooltip from this element.

Inherited From:
Overrides:
Returns:

This element.

Type
olympe.ui.vectorial.GraphicsElement

rotate(alpha [, x] [, y])

Parameters:
Name Type Argument Description
alpha olympe.df.PONumber | number
x olympe.df.PONumber | number <optional>
y olympe.df.PONumber | number <optional>
Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.GraphicsElement

setFillColor(color)

Sets a uniform color fill and opacity

Parameters:
Name Type Description
color olympe.df.Proxy.<olympe.df.Color> | olympe.df.Color
Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.GraphicsElement

setFilled(filled)

Sets if the element should be filled or not (essentially used to disable events on not filled area).

Parameters:
Name Type Description
filled olympe.df.Proxy.<olympe.df.OBoolean> | olympe.df.OBoolean | boolean
Inherited From:
Overrides:

setFilter(filter)

Sets a filter

Parameters:
Name Type Description
filter olympe.df.Proxy.<olympe.ui.vectorial.Filter> | olympe.ui.vectorial.Filter
Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.GraphicsElement

setFontFamily(fontFamily)

Sets the font family

Parameters:
Name Type Description
fontFamily olympe.df.POString | string
Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.TextContent

setFontSize(fontSize)

Sets the font size

Parameters:
Name Type Description
fontSize olympe.df.PONumber | number
Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.TextContent

setFontWeight(fontWeight)

Sets the font weight

Parameters:
Name Type Description
fontWeight olympe.df.PONumber | number
Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.TextContent

setGradient(gradient)

Sets a gradient

Parameters:
Name Type Description
gradient olympe.df.Proxy.<olympe.ui.vectorial.Gradient> | olympe.ui.vectorial.Gradient
Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.GraphicsElement

setHidden(hidden)

Parameters:
Name Type Description
hidden olympe.df.OBoolean | boolean | olympe.df.Proxy | olympe.df.Node

True if content must be hidden, false otherwise

Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.SvgElement

setHorizontalAlign(hAlign)

Sets the text horizontal alignment

Parameters:
Name Type Description
hAlign olympe.df.Proxy.<olympe.ui.common.HorizontalAlign> | olympe.ui.common.HorizontalAlign
Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.TextContent

setIgnoreUserInteraction( [ignore])

Disables mouse events for this element. However, mouse events will target its descendants unless they are manually set to also ignore user interactions.

Parameters:
Name Type Argument Default Description
ignore boolean <optional>
false

ignore If true, this element is never the target of mouse events (but not its descendants).

Inherited From:
Overrides:

setMask(mask)

Sets a mask.

Parameters:
Name Type Description
mask olympe.df.Proxy.<olympe.ui.vectorial.Mask> | olympe.ui.vectorial.Mask
Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.GraphicsElement

setPosition(position)

Sets the position of this element

Parameters:
Name Type Description
position olympe.df.PVector2 | olympe.df.Vector2

The position of this element

Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.BoxElement

setScale(scale)

Sets the scale of this element

Parameters:
Name Type Description
scale olympe.df.PONumber | number

Scale of this element

Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.BoxElement

setStrokeColor(color)

Sets the stroke color and opacity

Parameters:
Name Type Description
color olympe.df.Proxy.<olympe.df.Color> | olympe.df.Color
Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.GraphicsElement

setStrokeDashOffset(dashOffset)

Sets the stroke dash offset

Parameters:
Name Type Description
dashOffset olympe.df.PONumber | number

The stroke dash offset value [px]

Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.GraphicsElement

setStrokeDashPattern(dashPattern)

Sets the stroke dash pattern

Parameters:
Name Type Description
dashPattern olympe.df.POString | string

The stroke dash pattern, see SVG documentation for examples [px]

Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.GraphicsElement

setStrokeLinecap(linecap)

Sets the stroke linecap

Parameters:
Name Type Description
linecap olympe.df.POString | string

The stroke linecap (round, butt or square. Default: butt)

Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.GraphicsElement

setStrokeWidth(width)

Sets the stroke width

Parameters:
Name Type Description
width olympe.df.PONumber | number
Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.GraphicsElement

setText(text)

Sets the text value

Parameters:
Name Type Description
text olympe.df.POString | string
Inherited From:
Overrides:
Returns:
Type
olympe.ui.vectorial.TextContent

setTooltip(text [, options])

Assigns a tooltip to that element that will show up when the mouse hovers over it.

Parameters:
Name Type Argument Description
text olympe.df.POString

The text of the tooltip.

options Object <optional>

Various options for displaying the tooltip.

Properties
Name Type Argument Description
position olympe.df.PVector2 <optional>

The absolute position of the tooltip.

background olympe.df.PColor <optional>

The background color.

foreground olympe.df.PColor <optional>

The text color.

fontSize olympe.df.PONumber <optional>

The font size.

borderSize olympe.df.PONumber <optional>

The size of the border. Default is 1.

borderColor olympe.df.PColor <optional>

The color of the border. Default is black.

delay olympe.df.ONumber | number

The delay, in milliseconds, before showing the tooltip. Default is 500.

startingPos olympe.df.Vector2 <optional>

The starting position of the mouse. Default is (0,0).

Inherited From:
Overrides:
Returns:

This Element.

Type
olympe.ui.vectorial.GraphicsElement

unsetFilter()

Unsets a filter

Inherited From:
Overrides:

unsetGradient()

Unsets a gardient

Inherited From:
Overrides:

unsetMask()

Unsets a mask

Inherited From:
Overrides: