Class: AAlib::HardwareParams
- Inherits:
-
CPtr
- Object
- DL::PtrData
- CPtr
- AAlib::HardwareParams
- Defined in:
- lib/aalib.rb
Constant Summary collapse
- TYPE =
:nodoc:
'P' + 'I'*11 + 'D'*2
- NAMES =
[:font, :supported, :minwidth, :minheight, :maxwidth, :maxheight, :recwidth, :recheight, :mmwidth, :mmheight, :width, :height, :dimmul, :boldmul]
- DEFAULT =
Notably defined before we redifine initialize()
new(Foreign.defparams).freeze
Instance Method Summary collapse
- #copy_from(other) ⇒ Object
- #font ⇒ Object
-
#initialize(with_ptr = nil) ⇒ HardwareParams
constructor
A new instance of HardwareParams.
Methods inherited from CPtr
Methods included from ArgumentChecks
Methods inherited from DL::PtrData
Constructor Details
#initialize(with_ptr = nil) ⇒ HardwareParams
Returns a new instance of HardwareParams.
535 536 537 538 539 540 541 542 |
# File 'lib/aalib.rb', line 535 def initialize(with_ptr=nil) if with_ptr super(with_ptr) else super() copy_from(DEFAULT) end end |
Instance Method Details
#copy_from(other) ⇒ Object
544 545 546 547 548 549 |
# File 'lib/aalib.rb', line 544 def copy_from(other) NAMES.each do |get| set = (get.to_s + '=').to_sym self.send(set, other.send(get)) end end |