Class: Fzeet::IndirectFont

Inherits:
Handle
  • Object
show all
Includes:
FontMethods
Defined in:
lib/fzeet/Common.rb

Instance Attribute Summary collapse

Attributes inherited from Handle

#handle

Instance Method Summary collapse

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

#logfontObject (readonly)

Returns the value of attribute logfont.



254
255
256
# File 'lib/fzeet/Common.rb', line 254

def logfont
  @logfont
end

Instance Method Details

#disposeObject



256
# File 'lib/fzeet/Common.rb', line 256

def dispose; Windows.DeleteObject(@handle); detach end