Class: Qt::Pixmap

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.from_renderer(size, renderer, id = nil) ⇒ Object

Render a pixmap using an svg renderer. See also Qt::Image#renderer.



195
196
197
# File 'lib/rui/toolkits/qtbase/qt.rb', line 195

def self.from_renderer(size, renderer, id = nil)
  Qt::Image.from_renderer(size, renderer, id).to_pix
end

.from_svg(size, file, id = nil) ⇒ Object

Render a pixmap from an svg file. See also Qt::Image#renderer.



188
189
190
# File 'lib/rui/toolkits/qtbase/qt.rb', line 188

def self.from_svg(size, file, id = nil)
  from_renderer(size, Qt::SvgRenderer.new(file), id)
end

Instance Method Details

#add_effect(effect) ⇒ Object

Add an effect to this pixmap. If later this pixmap is assigned to an Item, all its effects will be transferred to it.



181
182
183
# File 'lib/rui/toolkits/qtbase/qt.rb', line 181

def add_effect(effect)
  effects << effect
end

#to_pixObject



199
200
201
# File 'lib/rui/toolkits/qtbase/qt.rb', line 199

def to_pix
  self
end