Text

smile.pictures.Text
object Text

Lines of text.

import smile.colors.PresetColor.*
import smile.modeling.*

val title = Text(Pos.Origin, None, "SMILe", "sans-serif", 48, 700, fillWith(Navy), None)

The word SMILe in bold navy letters

A text is an element like any other, and every transform of smile.pictures.Element applies to its letters.

Attributes

Source
Shapes.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Text.type

Members list

Value members

Concrete methods

def apply(pos: Pos, customBounds: Option[Bounds], content: String, font: String, size: Double, weight: Int, fill: Option[FillStyle], line: Option[StrokeStyle], rotationAngle: Double = ...): Element

content in font at size pixels and the CSS-style weight, its layout box centered at pos.

content in font at size pixels and the CSS-style weight, its layout box centered at pos.

With customBounds, the text is scaled to the size of that box and moved so that the middle of its bounds is the middle of the box. Last, it is turned by rotationAngle around its anchor.

Attributes

Throws
IllegalArgumentException

if the size is negative or not finite

Source
Shapes.scala