ModraUp Ruby API Documentation Ruby API Reference

Class: ModraUp::Text

Overview

Text is a Drawingelement whose label always faces the screen. Screen text (Model#add_note) is pinned to the window; model text (Entities#add_text or the Text tool) hangs off a 3D point with a 3D leader line.

Instance Method Summary # collapse

Inherited from ModraUp::Drawingelement

Inherited from ModraUp::Entity

Instance Method Details

#text ⇒ String

Returns:

  • (String)

#text=(str) ⇒ String

Parameters:

  • str (String)

Returns:

  • (String)

#point ⇒ Geom::Point3d

Model text: the 3D attach point (leader tip). Screen text (Model#add_note): a Point3d whose x/y are the normalised window position (0..1) and z is 0.

Returns:

  • (Geom::Point3d)

#point=(pt) ⇒ Geom::Point3d

Parameters:

  • pt (Geom::Point3d)

Returns:

  • (Geom::Point3d)

#vector ⇒ Geom::Vector3d

Offset from #point to the label. Screen text returns a zero vector.

Returns:

  • (Geom::Vector3d)

#vector=(vec) ⇒ Geom::Vector3d

Parameters:

  • vec (Geom::Vector3d)

Returns:

  • (Geom::Vector3d)

#has_leader? ⇒ Boolean

Returns:

  • (Boolean) true for a model text whose leader is shown.

#leader_type ⇒ Integer

Returns:

  • (Integer) ALeaderNone (0), ALeaderView (1) or ALeaderModel (2).

#leader_type=(type) ⇒ Integer

Parameters:

  • type (Integer) ALeaderNone / ALeaderView / ALeaderModel

Returns:

  • (Integer)

#display_leader? ⇒ Boolean

Returns:

  • (Boolean)

#display_leader=(show) ⇒ Boolean

Parameters:

  • show (Boolean)

Returns:

  • (Boolean)

#arrow_type ⇒ Integer

Returns:

  • (Integer) ModraUp::Dimension::ARROW_NONE .. ARROW_OPEN

#arrow_type=(type) ⇒ Integer

Parameters:

  • type (Integer)

Returns:

  • (Integer)

#line_weight ⇒ Integer

Returns:

  • (Integer) Leader line width in pixels (always 1).