Class: Ruby::Fillform::Checkbox

Inherits:
Field
  • Object
show all
Defined in:
lib/ruby-fillform.rb

Constant Summary collapse

YES =
"\u2713".freeze
NO =
"".freeze

Instance Method Summary collapse

Methods inherited from Field

#default_value, #description, #flags, #height, #initialize, #name, #rect, #value, #width, #x, #y

Constructor Details

This class inherits a constructor from Ruby::Fillform::Field

Instance Method Details

#font_colorObject



127
128
129
130
# File 'lib/ruby-fillform.rb', line 127

def font_color
  return "000013ec" unless deref(@dictionary[:DA])
  Prawn::Graphics::Color.rgb2hex(deref(@dictionary[:DA]).split(" ")[0..2].collect { |e| e.to_f * 255 }).to_s
end

#font_sizeObject



136
137
138
# File 'lib/ruby-fillform.rb', line 136

def font_size
  12.0
end

#font_styleObject



132
133
134
# File 'lib/ruby-fillform.rb', line 132

def font_style
  :normal
end

#typeObject



123
124
125
# File 'lib/ruby-fillform.rb', line 123

def type
  :checkbox
end