11f343b8117dbf56931f537820c2749a8232fec2Liam P. White/**
11f343b8117dbf56931f537820c2749a8232fec2Liam P. White * @file
7b1443968fea3c27f050045c4c16820211119099jeff_schiller * Bitmap image belonging to an SVG drawing.
7b1443968fea3c27f050045c4c16820211119099jeff_schiller *//*
7b1443968fea3c27f050045c4c16820211119099jeff_schiller * Authors:
7b1443968fea3c27f050045c4c16820211119099jeff_schiller * Krzysztof KosiƄski <tweenk.pl@gmail.com>
7b1443968fea3c27f050045c4c16820211119099jeff_schiller *
7b1443968fea3c27f050045c4c16820211119099jeff_schiller * Copyright (C) 2011 Authors
7b1443968fea3c27f050045c4c16820211119099jeff_schiller * Released under GNU GPL, read the file 'COPYING' for more information
7b1443968fea3c27f050045c4c16820211119099jeff_schiller */
7b1443968fea3c27f050045c4c16820211119099jeff_schiller
7b1443968fea3c27f050045c4c16820211119099jeff_schiller#ifndef SEEN_INKSCAPE_DISPLAY_DRAWING_IMAGE_H
7b1443968fea3c27f050045c4c16820211119099jeff_schiller#define SEEN_INKSCAPE_DISPLAY_DRAWING_IMAGE_H
7b1443968fea3c27f050045c4c16820211119099jeff_schiller
7b1443968fea3c27f050045c4c16820211119099jeff_schiller#include <cairo.h>
7b1443968fea3c27f050045c4c16820211119099jeff_schiller#include <gdk-pixbuf/gdk-pixbuf.h>
aded4b44e9194df7c9905c5787d1c7a9553d12cdMarkus Engel#include <2geom/transforms.h>
d74e415b7dd25ccb70d40a9f11ec99f23b57ed63Markus Engel
7b1443968fea3c27f050045c4c16820211119099jeff_schiller#include "display/drawing-item.h"
35087bff7509c736a32e0b74fd9ff0834bde7b6bMarkus Engel
587f9dc76091a65db84d0f329321fecfb5294a77Markus Engelnamespace Inkscape {
a2e796b608034e2c62290378d713058b8b58ef8fMarkus Engelclass Pixbuf;
2ee985b728402e20092ee821697f4c5117247290Markus Engel
587f9dc76091a65db84d0f329321fecfb5294a77Markus Engelclass DrawingImage
11f343b8117dbf56931f537820c2749a8232fec2Liam P. White : public DrawingItem
587f9dc76091a65db84d0f329321fecfb5294a77Markus Engel{
587f9dc76091a65db84d0f329321fecfb5294a77Markus Engelpublic:
7b1443968fea3c27f050045c4c16820211119099jeff_schiller DrawingImage(Drawing &drawing);
~DrawingImage();
void setPixbuf(Inkscape::Pixbuf *pb);
void setScale(double sx, double sy);
void setOrigin(Geom::Point const &o);
void setClipbox(Geom::Rect const &box);
Geom::Rect bounds() const;
protected:
virtual unsigned _updateItem(Geom::IntRect const &area, UpdateContext const &ctx,
unsigned flags, unsigned reset);
virtual unsigned _renderItem(DrawingContext &dc, Geom::IntRect const &area, unsigned flags,
DrawingItem *stop_at);
virtual DrawingItem *_pickItem(Geom::Point const &p, double delta, unsigned flags);
Inkscape::Pixbuf *_pixbuf;
// TODO: the following three should probably be merged into a new Geom::Viewbox object
Geom::Rect _clipbox; ///< for preserveAspectRatio
Geom::Point _origin;
Geom::Scale _scale;
};
} // end namespace Inkscape
#endif // !SEEN_INKSCAPE_DISPLAY_DRAWING_ITEM_H
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :