svg-builder.h revision c0537dcfe264414d52ad86579d57cb0cb2183dcb
/*
* 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>
#include <glib.h>
struct SvgTransparencyGroup;
/**
* Holds information about the current softmask and group depth for use of libpoppler.
* 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
};
/**
* Holds information about glyphs added by PdfParser which haven't been added
* to the document yet.
*/
struct SvgGlyph {
double dx; // X advance value
double dy; // Y advance value
double rise; // Text rise parameter
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
};
/**
* Builds the inner SVG representation using libpoppler 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
double _width; // Document size in px
double _height; // Document size in px
};
} // namespace Internal
} // namespace Extension
} // namespace Inkscape
#endif // HAVE_POPPLER
#endif // SEEN_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 :