2
Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
13
#include <ksvgrenderer.h>
14
#include <kstandarddirs.h>
19
m_renderer = new KSvgRenderer(
20
KStandardDirs::locate("appdata", "pictures/theme.svgz"), 0);
29
QPixmap Renderer::render(const QString& id)
31
if (!m_cache.contains(id)) {
32
QImage tmp(m_size, QImage::Format_ARGB32_Premultiplied);
36
m_renderer->render(&p, id, QRectF(QPointF(0, 0), m_size));
39
m_cache[id] = QPixmap::fromImage(tmp);
42
return m_cache.value(id);
46
void Renderer::resize(const QSize& size)