Class: Fzeet::IndirectFont

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(logfont) ⇒ IndirectFont

Returns a new instance of IndirectFont.



228
229
230
# File 'lib/fzeet/windows/core/Common.rb', line 228

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.



232
233
234
# File 'lib/fzeet/windows/core/Common.rb', line 232

def logfont
  @logfont
end

Instance Method Details

#disposeObject



234
# File 'lib/fzeet/windows/core/Common.rb', line 234

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