Logo Search packages:      
Sourcecode: inkscape version File versions

style.cpp File Reference

Detailed Description

SVG stylesheets implementation.

Definition in file style.cpp.

#include <cstring>
#include <string>
#include "libcroco/cr-sel-eng.h"
#include "xml/croco-node-iface.h"
#include "svg/svg.h"
#include "svg/svg-color.h"
#include "svg/svg-icc-color.h"
#include "display/canvas-bpath.h"
#include "attributes.h"
#include "document.h"
#include "extract-uri.h"
#include "uri-references.h"
#include "uri.h"
#include "sp-paint-server.h"
#include "streq.h"
#include "strneq.h"
#include "style.h"
#include "svg/css-ostringstream.h"
#include "xml/repr.h"
#include "xml/simple-document.h"
#include "unit-constants.h"
#include "2geom/isnan.h"
#include "macros.h"
#include "preferences.h"
#include "sp-filter-reference.h"
#include <sigc++/functors/ptr_fun.h>
#include <sigc++/adaptors/bind.h>

Go to the source code of this file.


struct  SPStyleEnum


#define __SP_STYLE_C__
#define BMAX   8192
#define SPS_READ_IENUM_IF_UNSET(v, s, d, i)   if (!(v)->set) {sp_style_read_ienum((v), (s), (d), (i));}
#define SPS_READ_IFONTSIZE_IF_UNSET(v, s)   if (!(v)->set) {sp_style_read_ifontsize((v), (s));}
#define SPS_READ_ILENGTH_IF_UNSET(v, s)   if (!(v)->set) {sp_style_read_ilength((v), (s));}
#define SPS_READ_PENUM_IF_UNSET(v, r, k, d, i)   if (!(v)->set) {sp_style_read_penum((v), (r), (k), (d), (i));}
#define SPS_READ_PFLOAT_IF_UNSET(v, r, k)   if (!(v)->set) {sp_style_read_pfloat((v), (r), (k));}
#define SPS_READ_PFONTSIZE_IF_UNSET(v, r, k)   if (!(v)->set) {sp_style_read_pfontsize((v), (r), (k));}
#define SPS_READ_PLENGTH_IF_UNSET(v, r, k)   if (!(v)->set) {sp_style_read_plength((v), (r), (k));}


gchar * attribute_unquote (gchar const *val)
gchar * css2_escape_quote (gchar const *val)
static double get_relative_font_size_frac (SPIFontSize const &font_size)
bool is_url (char const *p)
SPCSSAttr * sp_css_attr_from_object (SPObject *object, guint const flags)
SPCSSAttr * sp_css_attr_from_style (SPStyle const *const style, guint const flags)
SPCSSAttr * sp_css_attr_scale (SPCSSAttr *css, double ex)
void sp_css_attr_scale_property_list (SPCSSAttr *css, gchar const *property, double ex)
void sp_css_attr_scale_property_single (SPCSSAttr *css, gchar const *property, double ex, bool only_with_units=false)
SPCSSAttr * sp_css_attr_unset_text (SPCSSAttr *css)
SPCSSAttr * sp_css_attr_unset_uris (SPCSSAttr *css)
static bool sp_fontsize_differ (SPIFontSize const *const a, SPIFontSize const *const b)
static bool sp_length_differ (SPILength const *const a, SPILength const *const b)
static bool sp_lengthornormal_differ (SPILengthOrNormal const *const a, SPILengthOrNormal const *const b)
static bool sp_paint_differ (SPIPaint const *const a, SPIPaint const *const b)
static CRSelEng * sp_repr_sel_eng ()
static void sp_style_clear (SPStyle *style)
static void sp_style_fill_paint_server_ref_changed (SPObject *old_ref, SPObject *ref, SPStyle *style)
static void sp_style_filter_clear (SPStyle *style)
static void sp_style_filter_ref_changed (SPObject *old_ref, SPObject *ref, SPStyle *style)
static void sp_style_filter_ref_modified (SPObject *obj, guint flags, SPStyle *style)
static void sp_style_merge_font_size_from_parent (SPIFontSize &child, SPIFontSize const &parent)
static void sp_style_merge_from_decl_list (SPStyle *const style, CRDeclaration const *const decl_list)
void sp_style_merge_from_dying_parent (SPStyle *const style, SPStyle const *const parent)
static void sp_style_merge_from_object_stylesheet (SPStyle *, SPObject const *)
void sp_style_merge_from_parent (SPStyle *const style, SPStyle const *const parent)
static void sp_style_merge_from_props (SPStyle *const style, CRPropList *const props)
void sp_style_merge_from_style_string (SPStyle *const style, gchar const *const p)
static void sp_style_merge_ifilter (SPStyle *style, SPIFilter const *parent)
static void sp_style_merge_ipaint (SPStyle *style, SPIPaint *paint, SPIPaint const *parent)
template<typename LengthT>
static void sp_style_merge_length_prop_from_dying_parent (LengthT &child, LengthT const &parent, double const parent_child_em_ratio)
static void sp_style_merge_paint_prop_from_dying_parent (SPStyle *style, SPIPaint &child, SPIPaint const &parent)
template<typename T>
static void sp_style_merge_prop_from_dying_parent (T &child, T const &parent)
static void sp_style_merge_property (SPStyle *style, gint id, gchar const *val)
static void sp_style_merge_rel_enum_prop_from_dying_parent (SPIEnum &child, SPIEnum const &parent, unsigned const max_computed_val, unsigned const smaller_val)
static void sp_style_merge_string_prop_from_dying_parent (SPIString &child, SPIString const &parent)
static void sp_style_merge_style_from_decl (SPStyle *const style, CRDeclaration const *const decl)
SPStylesp_style_new (SPDocument *document)
SPStylesp_style_new_from_object (SPObject *object)
static void sp_style_object_release (SPObject *object, SPStyle *style)
static void sp_style_paint_server_ref_modified (SPObject *obj, guint flags, SPStyle *style)
static void sp_style_privatize_text (SPStyle *style)
static void sp_style_read (SPStyle *style, SPObject *object, Inkscape::XML::Node *repr)
static void sp_style_read_dash (SPStyle *style, gchar const *str)
void sp_style_read_from_object (SPStyle *style, SPObject *object)
void sp_style_read_from_prefs (SPStyle *style, Glib::ustring const &path)
static void sp_style_read_icolor (SPIPaint *paint, gchar const *str, SPStyle *style, SPDocument *document)
static void sp_style_read_ienum (SPIEnum *val, gchar const *str, SPStyleEnum const *dict, bool can_explicitly_inherit)
static void sp_style_read_ifilter (gchar const *str, SPStyle *style, SPDocument *document)
static void sp_style_read_ifloat (SPIFloat *val, gchar const *str)
static void sp_style_read_ifontsize (SPIFontSize *val, gchar const *str)
static void sp_style_read_ilength (SPILength *val, gchar const *str)
static void sp_style_read_ilengthornormal (SPILengthOrNormal *val, gchar const *str)
static void sp_style_read_ipaint (SPIPaint *paint, gchar const *str, SPStyle *style, SPDocument *document)
static void sp_style_read_iscale24 (SPIScale24 *val, gchar const *str)
static void sp_style_read_istring (SPIString *val, gchar const *str)
static void sp_style_read_itextdecoration (SPITextDecoration *val, gchar const *str)
static void sp_style_read_penum (SPIEnum *val, Inkscape::XML::Node *repr, gchar const *key, SPStyleEnum const *dict, bool can_explicitly_inherit)
static void sp_style_read_pfloat (SPIFloat *val, Inkscape::XML::Node *repr, gchar const *key)
static void sp_style_read_pfontsize (SPIFontSize *val, Inkscape::XML::Node *repr, gchar const *key)
static void sp_style_read_plength (SPILength *val, Inkscape::XML::Node *repr, gchar const *key)
SPStylesp_style_ref (SPStyle *style)
static void sp_style_set_ipaint_to_uri (SPStyle *style, SPIPaint *paint, const Inkscape::URI *uri, SPDocument *document)
static void sp_style_set_ipaint_to_uri_string (SPStyle *style, SPIPaint *paint, const gchar *uri)
void sp_style_set_property_url (SPObject *item, gchar const *property, SPObject *linked, bool recursive)
void sp_style_set_to_uri_string (SPStyle *style, bool isfill, const gchar *uri)
static void sp_style_stroke_paint_server_ref_changed (SPObject *old_ref, SPObject *ref, SPStyle *style)
SPStylesp_style_unref (SPStyle *style)
void sp_style_unset_property_attrs (SPObject *o)
gchar * sp_style_write_difference (SPStyle const *const from, SPStyle const *const to)
static gint sp_style_write_ienum (gchar *p, gint len, gchar const *key, SPStyleEnum const *dict, SPIEnum const *val, SPIEnum const *base, guint flags)
static gint sp_style_write_ifilter (gchar *b, gint len, gchar const *key, SPIFilter const *filter, SPIFilter const *base, guint flags)
static gint sp_style_write_ifloat (gchar *p, gint len, gchar const *key, SPIFloat const *val, SPIFloat const *base, guint flags)
static gint sp_style_write_ifontsize (gchar *p, gint len, gchar const *key, SPIFontSize const *val, SPIFontSize const *base, guint flags)
static gint sp_style_write_ilength (gchar *p, gint len, gchar const *key, SPILength const *val, SPILength const *base, guint flags)
static gint sp_style_write_ilengthornormal (gchar *p, gint const len, gchar const *const key, SPILengthOrNormal const *const val, SPILengthOrNormal const *const base, guint const flags)
static gint sp_style_write_ipaint (gchar *b, gint len, gchar const *key, SPIPaint const *paint, SPIPaint const *base, guint flags)
static gint sp_style_write_iscale24 (gchar *p, gint len, gchar const *key, SPIScale24 const *val, SPIScale24 const *base, guint flags)
static gint sp_style_write_istring (gchar *p, gint len, gchar const *key, SPIString const *val, SPIString const *base, guint flags)
static gint sp_style_write_itextdecoration (gchar *p, gint const len, gchar const *const key, SPITextDecoration const *const val, SPITextDecoration const *const base, guint const flags)
gchar * sp_style_write_string (SPStyle const *const style, guint const flags)
static void sp_text_style_clear (SPTextStyle *ts)
static SPTextStylesp_text_style_duplicate_unset (SPTextStyle *st)
static SPTextStylesp_text_style_new (void)
static SPTextStylesp_text_style_unref (SPTextStyle *st)
static guint sp_text_style_write (gchar *p, guint len, SPTextStyle const *st, guint flags=SP_STYLE_FLAG_IFSET)
static bool sp_textdecoration_differ (SPITextDecoration const *const a, SPITextDecoration const *const b)


static SPStyleEnum const enum_block_progression []
static SPStyleEnum const enum_color_rendering []
static SPStyleEnum const enum_direction []
static SPStyleEnum const enum_display []
static SPStyleEnum const enum_enable_background []
static SPStyleEnum const enum_fill_rule []
static SPStyleEnum const enum_font_size []
static SPStyleEnum const enum_font_stretch []
static SPStyleEnum const enum_font_style []
static SPStyleEnum const enum_font_variant []
static SPStyleEnum const enum_font_weight []
static SPStyleEnum const *const enum_image_rendering = enum_color_rendering
static SPStyleEnum const enum_overflow []
static SPStyleEnum const enum_shape_rendering []
static SPStyleEnum const enum_stroke_linecap []
static SPStyleEnum const enum_stroke_linejoin []
static SPStyleEnum const enum_text_align []
static SPStyleEnum const enum_text_anchor []
static SPStyleEnum const enum_text_rendering []
static SPStyleEnum const enum_text_transform []
static SPStyleEnum const enum_visibility []
static SPStyleEnum const enum_writing_mode []
static float const font_size_table [] = {6.0, 8.0, 10.0, 12.0, 14.0, 18.0, 24.0}

Generated by  Doxygen 1.6.0   Back to index