Class: RGhost::Gray
Overview
Creates Gray color
Instance Attribute Summary collapse
-
#gray ⇒ Object
Returns the value of attribute gray.
Instance Method Summary collapse
-
#initialize(gray = 0.8) ⇒ Gray
constructor
A single Numeric Color.create 0.5 50 percent of black will be divided by 100.0 Color.create 50.
-
#ps ⇒ Object
:nodoc:.
Methods inherited from Color
Methods included from RubyToPs
#array_to_stack, #hash_to_array, #pack_string, #ps_escape, #string_eval, #to_array, #to_bool, #to_string, #to_string_array
Methods inherited from PsObject
#<<, #call, #graphic_scope, #raw, #set, #to_s
Constructor Details
#initialize(gray = 0.8) ⇒ Gray
A single Numeric Color.create 0.5 50 percent of black will be divided by 100.0 Color.create 50
166 167 168 |
# File 'lib/rghost/color.rb', line 166 def initialize(gray=0.8) @gray=gray end |
Instance Attribute Details
#gray ⇒ Object
Returns the value of attribute gray.
160 161 162 |
# File 'lib/rghost/color.rb', line 160 def gray @gray end |
Instance Method Details
#ps ⇒ Object
:nodoc:
170 171 172 173 |
# File 'lib/rghost/color.rb', line 170 def ps #:nodoc: @gray = @gray/100.0 if @gray > 1 "#{@gray} setgray" end |