Class: Metro::Model::ColorProperty
- Defined in:
- lib/metro/models/properties/color_property.rb
Overview
A color property maintains a Gosu::Color.
A color property also defines an alpha property which allows a more direct interface to setting the alpha property on the color. This is useful in cases for images where the color remains as white but the alpha value needs to be adjusted.
A color is stored in the properties as a string representation and is converted into a Gosu::Color when it is retrieved within the system.
Constant Summary
Constants included from Units
Instance Attribute Summary
Attributes inherited from Property
Instance Method Summary collapse
-
#default_color ⇒ Object
The default color of the color property.
Methods inherited from Property
define_property, defined_properties, get, #get, get_or_set, gets, hash_with_default_to_nil, inherited, #initialize, properties, properties_hash, property, #set, set, sets
Constructor Details
This class inherits a constructor from Metro::Model::Property
Instance Method Details
#default_color ⇒ Object
Returns the default color of the color property. This can be set during initialization by usign the option ‘default`.
99 100 101 |
# File 'lib/metro/models/properties/color_property.rb', line 99 def default_color create_color(default_color_string) end |