Class: Qt::Painter

Inherits:
Object show all
Defined in:
lib/rui/toolkits/qtbase/qt.rb

Instance Method Summary collapse

Instance Method Details

#paintObject

Ensure this painter is closed after the block is executed.



41
42
43
44
45
# File 'lib/rui/toolkits/qtbase/qt.rb', line 41

def paint
  yield self
ensure
  self.end
end

#savingObject

Execute a block, then restore the painter state to what it was before execution.



51
52
53
54
55
56
# File 'lib/rui/toolkits/qtbase/qt.rb', line 51

def saving
  save
  yield self
ensure
  restore
end