Class: RGhost::Gray
Overview
Creates Gray color
Constant Summary
Constants included from RubyToPs
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
163 164 165 |
# File 'lib/rghost/color.rb', line 163 def initialize(gray=0.8) @gray=gray end |
Instance Attribute Details
#gray ⇒ Object
Returns the value of attribute gray.
157 158 159 |
# File 'lib/rghost/color.rb', line 157 def gray @gray end |
Instance Method Details
#ps ⇒ Object
:nodoc:
167 168 169 170 |
# File 'lib/rghost/color.rb', line 167 def ps #:nodoc: @gray = @gray/100.0 if @gray > 1 "#{@gray} setgray" end |