1
#ifndef EXTENSION_INTERNAL_CAIRO_RENDERER_H_SEEN
2
#define EXTENSION_INTERNAL_CAIRO_RENDERER_H_SEEN
5
* Declaration of CairoRenderer, a class used for rendering via a CairoRenderContext.
9
* Miklos Erdelyi <erdelyim@gmail.com>
11
* Copyright (C) 2006 Miklos Erdelyi
13
* Licensed under GNU GPL
20
#include "extension/extension.h"
24
//#include "libnrtype/font-instance.h"
37
class CairoRenderContext;
42
virtual ~CairoRenderer(void);
44
CairoRenderContext *createContext(void);
45
void destroyContext(CairoRenderContext *ctx);
47
void setStateForItem(CairoRenderContext *ctx, SPItem const *item);
49
void applyClipPath(CairoRenderContext *ctx, SPClipPath const *cp);
50
void applyMask(CairoRenderContext *ctx, SPMask const *mask);
52
/** Initializes the CairoRenderContext according to the specified
53
SPDocument. A set*Target function can only be called on the context
54
before setupDocument. */
55
bool setupDocument(CairoRenderContext *ctx, SPDocument *doc, bool pageBoundingBox, SPItem *base);
57
/** Traverses the object tree and invokes the render methods. */
58
void renderItem(CairoRenderContext *ctx, SPItem *item);
61
// FIXME: this should be a static method of CairoRenderer
62
void calculatePreserveAspectRatio(unsigned int aspect_align, unsigned int aspect_clip, double vp_width,
63
double vp_height, double *x, double *y, double *width, double *height);
65
} /* namespace Internal */
66
} /* namespace Extension */
67
} /* namespace Inkscape */
69
#endif /* !EXTENSION_INTERNAL_CAIRO_RENDERER_H_SEEN */
74
c-file-style:"stroustrup"
75
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
80
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :