Class: Fzeet::IndirectFont
- Includes:
- FontMethods
- Defined in:
- lib/fzeet/Common.rb
Instance Attribute Summary collapse
-
#logfont ⇒ Object
readonly
Returns the value of attribute logfont.
Attributes inherited from Handle
Instance Method Summary collapse
- #dispose ⇒ Object
-
#initialize(logfont) ⇒ IndirectFont
constructor
A new instance of IndirectFont.
Methods inherited from Handle
#attach, #detach, #dup, instance, instance?, wrap
Constructor Details
#initialize(logfont) ⇒ IndirectFont
Returns a new instance of IndirectFont.
250 251 252 |
# File 'lib/fzeet/Common.rb', line 250 def initialize(logfont) @handle = Windows.DetonateLastError(FFI::Pointer::NULL, :CreateFontIndirect, @logfont = logfont); attach end |
Instance Attribute Details
#logfont ⇒ Object (readonly)
Returns the value of attribute logfont.
254 255 256 |
# File 'lib/fzeet/Common.rb', line 254 def logfont @logfont end |
Instance Method Details
#dispose ⇒ Object
256 |
# File 'lib/fzeet/Common.rb', line 256 def dispose; Windows.DeleteObject(@handle); detach end |