class Qt::Pixmap

Public Class Methods

from_renderer(size, renderer, id = nil) click to toggle source

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

# 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) click to toggle source

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

# 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

Public Instance Methods

add_effect(effect) click to toggle source

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

# File lib/rui/toolkits/qtbase/qt.rb, line 181
def add_effect(effect)
  effects << effect
end
to_pix() click to toggle source
# File lib/rui/toolkits/qtbase/qt.rb, line 199
def to_pix
  self
end

Private Instance Methods

effects() click to toggle source

Qt > 4.6 provides effects to be applied to Qt::GraphicsItem’s. Since kaya effects work at a lower level of abstraction (i.e. at pixmap/image level), we embed effects directly in a pixmap.

When a pixmap is assigned to a Qt::GraphicsItem, its effects are transferred to the item.

# File lib/rui/toolkits/qtbase/qt.rb, line 171
def effects
  @effects ||= []
end