Class: SDC::Text

Inherits:
Object
  • Object
show all
Defined in:
engine_docs/automatic_doc_Text.rb,
lib/core/Text.rb,
engine_docs/automatic_doc_Text.rb

Overview

Drawable text class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(content, font, character_size = 30) ⇒ Text

Creates a text object with the given content, font and character size

Parameters:

  • content (String)
  • font (Font)
  • character_size (Integer) (defaults to: 30)


# File 'engine_docs/automatic_doc_Text.rb', line 9

Instance Attribute Details

#character_sizeInteger

Character size of the text in pixels

Returns:

  • (Integer)


# File 'engine_docs/automatic_doc_Text.rb', line 17

#fill_colorColor

Fill color of the text

Returns:



# File 'engine_docs/automatic_doc_Text.rb', line 21

#outline_colorColor

Outline color of the text

Returns:



# File 'engine_docs/automatic_doc_Text.rb', line 25

#stringString

Content of the text

Returns:

  • (String)


# File 'engine_docs/automatic_doc_Text.rb', line 29

Instance Method Details

#colorObject



12
13
14
# File 'lib/core/Text.rb', line 12

def color
	return self.fill_color
end

#color=(value) ⇒ Object

Use these methods only if you want to treat outline and fill color as same



7
8
9
10
# File 'lib/core/Text.rb', line 7

def color=(value)
	self.outline_color = value
	self.fill_color = value
end