svg-builder.h revision 75b857d473541532819bd791105cb352c9a43214
/** \file
* SVG representation creator using libpoppler.
*
* Authors:
* miklos erdelyi
*
* Copyright (C) 2007 Authors
*
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#ifdef HAVE_POPPLER
}
}
#include "CharTypes.h"
struct GfxState;
#include <vector>
struct SvgTransparencyGroup;
/**
* \struct SvgGraphicsState
* Holds information about the current softmask and group depth.
* Could be later used to store other graphics state parameters so that we could
* emit only the differences in style settings from the parent state.
*/
struct SvgGraphicsState {
int group_depth; // Depth of nesting groups at this level
};
/**
* \struct SvgGlyph
* Holds information about glyphs added by PdfParser which haven't been added
* to the document yet.
*/
struct SvgGlyph {
double rise; // Text rise parameter
int code_size;
bool is_space;
bool style_changed; // Set to true if style has to be reset
int render_mode; // Text render mode
char *font_specification; // Pointer to current font specification
};
/**
* \class SvgBuilder
*
* Builds the inner SVG representation from the calls of PdfParser
*
*/
virtual ~SvgBuilder();
// Property setting
void setGroupOpacity(double opacity);
return _preferences;
}
// Handling the node stack
// Path adding
// Image handling
bool invert);
bool invert_mask);
// Transparency group and soft mask handling
bool for_softmask);
// Text handling
// State manipulation
void saveState();
void restoreState();
// Clipping
// Transforming
double c5);
void setTransform(double const *transform);
bool getTransform(double *transform);
void _init();
// Pattern creation
bool is_stroke=false);
bool alpha_only=false, bool invert_alpha=false);
// Style setting
void _flushText(); // Write buffered text into doc
// Handling of node stack
char *_font_specification;
double _font_scaling;
bool _need_font_update;
bool _in_text_object; // Whether we are inside a text object
bool _invalidated_style;
std::vector<std::string> _availableFontNames; // Full names, used for matching font names (Bug LP #179589).
bool _is_top_level; // Whether this SvgBuilder is the top-level one
};
} } } /* namespace Inkscape, Extension, Internal */
#endif /* HAVE_POPPLER */
#endif /* __EXTENSION_INTERNAL_PDFINPUT_SVGBUILDER_H__ */
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :