From 43f80e25517651b82754e3b05303dacff0c03a10 Mon Sep 17 00:00:00 2001 From: Geoff Lankow Date: Tue, 7 Jul 2015 21:22:31 +1200 Subject: Read inkscape:color attribute on guides (bzr r14228.1.1) --- src/attributes.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/attributes.cpp') diff --git a/src/attributes.cpp b/src/attributes.cpp index af19360c1..991834cb2 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -125,6 +125,7 @@ static SPStyleProp const props[] = { /* SPGuide */ {SP_ATTR_ORIENTATION, "orientation"}, {SP_ATTR_POSITION, "position"}, + {SP_ATTR_INKSCAPE_COLOR, "inkscape:color"}, /* SPImage */ {SP_ATTR_X, "x"}, {SP_ATTR_Y, "y"}, -- cgit v1.2.3 From b80f68e9585593a78bad9ae34385cbebe780299a Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Thu, 15 Oct 2015 13:52:47 +0200 Subject: Add new 'writing-mode' values, remove 'block-progression', fix a few typos. (bzr r14416) --- src/attributes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/attributes.cpp') diff --git a/src/attributes.cpp b/src/attributes.cpp index 991834cb2..a237f8861 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -440,8 +440,8 @@ static SPStyleProp const props[] = { /* Text (css3) */ {SP_PROP_DIRECTION, "direction"}, - {SP_PROP_BLOCK_PROGRESSION, "block-progression"}, {SP_PROP_WRITING_MODE, "writing-mode"}, + {SP_PROP_TEXT_ORIENTATION, "text-orientation"}, {SP_PROP_UNICODE_BIDI, "unicode-bidi"}, {SP_PROP_ALIGNMENT_BASELINE, "alignment-baseline"}, {SP_PROP_BASELINE_SHIFT, "baseline-shift"}, -- cgit v1.2.3 From 067752b1cf216b8aa55c9e52926496553673cdb7 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Wed, 2 Dec 2015 18:24:10 +0100 Subject: Add lock to guides (bzr r14500.1.1) --- src/attributes.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/attributes.cpp') diff --git a/src/attributes.cpp b/src/attributes.cpp index a237f8861..5da75e348 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -116,6 +116,7 @@ static SPStyleProp const props[] = { {SP_ATTR_INKSCAPE_SNAP_PAGE_BORDER, "inkscape:snap-page"}, {SP_ATTR_INKSCAPE_CURRENT_LAYER, "inkscape:current-layer"}, {SP_ATTR_INKSCAPE_DOCUMENT_UNITS, "inkscape:document-units"}, // This setting sets the Display units, *not* the units used in SVG + {SP_ATTR_INKSCAPE_LOCKED, "inkscape:locked"}, {SP_ATTR_UNITS, "units"}, {SP_ATTR_INKSCAPE_CONNECTOR_SPACING, "inkscape:connector-spacing"}, /* SPColorProfile */ -- cgit v1.2.3 From 6adeeb23bc139967e8c81a4790250aba43390b61 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Wed, 2 Dec 2015 18:31:07 +0100 Subject: Add spray-origin missing atribute (bzr r14501) --- src/attributes.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/attributes.cpp') diff --git a/src/attributes.cpp b/src/attributes.cpp index a237f8861..d373dbc68 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -41,6 +41,7 @@ static SPStyleProp const props[] = { {SP_ATTR_TRANSFORM_CENTER_Y, "inkscape:transform-center-y"}, {SP_ATTR_INKSCAPE_PATH_EFFECT, "inkscape:path-effect"}, {SP_ATTR_INKSCAPE_HIGHLIGHT_COLOR, "inkscape:highlight-color"}, + {SP_ATTR_INKSCAPE_SPRAY_ORIGIN, "inkscape:spray-origin"}, /* SPAnchor */ {SP_ATTR_XLINK_HREF, "xlink:href"}, {SP_ATTR_XLINK_TYPE, "xlink:type"}, -- cgit v1.2.3 From dc6693bd22141b4bcecdc023bebf826f08baa0de Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Wed, 2 Dec 2015 18:39:59 +0100 Subject: Reorder attribute lock to better position (bzr r14500.1.2) --- src/attributes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/attributes.cpp') diff --git a/src/attributes.cpp b/src/attributes.cpp index 5da75e348..853e22345 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -116,7 +116,6 @@ static SPStyleProp const props[] = { {SP_ATTR_INKSCAPE_SNAP_PAGE_BORDER, "inkscape:snap-page"}, {SP_ATTR_INKSCAPE_CURRENT_LAYER, "inkscape:current-layer"}, {SP_ATTR_INKSCAPE_DOCUMENT_UNITS, "inkscape:document-units"}, // This setting sets the Display units, *not* the units used in SVG - {SP_ATTR_INKSCAPE_LOCKED, "inkscape:locked"}, {SP_ATTR_UNITS, "units"}, {SP_ATTR_INKSCAPE_CONNECTOR_SPACING, "inkscape:connector-spacing"}, /* SPColorProfile */ @@ -127,6 +126,7 @@ static SPStyleProp const props[] = { {SP_ATTR_ORIENTATION, "orientation"}, {SP_ATTR_POSITION, "position"}, {SP_ATTR_INKSCAPE_COLOR, "inkscape:color"}, + {SP_ATTR_INKSCAPE_LOCKED, "inkscape:locked"}, /* SPImage */ {SP_ATTR_X, "x"}, {SP_ATTR_Y, "y"}, -- cgit v1.2.3 From e649a1d9cd29f39b2d1cf343cec97ccebce9cf08 Mon Sep 17 00:00:00 2001 From: Jabier Arraiza Cenoz Date: Sat, 5 Dec 2015 23:55:57 +0100 Subject: Changed from Desktop to namedview to handle multiples documents (bzr r14500.1.8) --- src/attributes.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/attributes.cpp') diff --git a/src/attributes.cpp b/src/attributes.cpp index 9a779836b..ad6a51c88 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -117,6 +117,7 @@ static SPStyleProp const props[] = { {SP_ATTR_INKSCAPE_SNAP_PAGE_BORDER, "inkscape:snap-page"}, {SP_ATTR_INKSCAPE_CURRENT_LAYER, "inkscape:current-layer"}, {SP_ATTR_INKSCAPE_DOCUMENT_UNITS, "inkscape:document-units"}, // This setting sets the Display units, *not* the units used in SVG + {SP_ATTR_INKSCAPE_LOCKGUIDES, "inkscape:lockguides"}, {SP_ATTR_UNITS, "units"}, {SP_ATTR_INKSCAPE_CONNECTOR_SPACING, "inkscape:connector-spacing"}, /* SPColorProfile */ -- cgit v1.2.3 From 1c18349cc106bb55c7bca12fd572fb7b899ff225 Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Wed, 9 Dec 2015 01:45:44 +0100 Subject: replaced remaining GHashTable with std::map (bzr r14504.1.16) --- src/attributes.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'src/attributes.cpp') diff --git a/src/attributes.cpp b/src/attributes.cpp index ad6a51c88..e8620a498 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -536,21 +536,13 @@ static SPStyleProp const props[] = { unsigned sp_attribute_lookup(gchar const *key) { - static GHashTable *propdict = NULL; - - if (!propdict) { - unsigned int i; - propdict = g_hash_table_new(g_str_hash, g_str_equal); - for (i = 1; i < n_attrs; i++) { - g_assert(props[i].code == static_cast< gint >(i) ); - // If this g_assert fails, then the sort order of SPAttributeEnum does not match the order in props[]! - g_hash_table_insert(propdict, - const_cast(static_cast(props[i].name)), - GINT_TO_POINTER(props[i].code)); - } + for (unsigned int i = 1; i < n_attrs; i++) { + g_assert(props[i].code == static_cast< gint >(i) ); + // If this g_assert fails, then the sort order of SPAttributeEnum does not match the order in props[]! + if(g_str_equal(const_cast(static_cast(props[i].name)), key)) + return GPOINTER_TO_UINT(GINT_TO_POINTER(props[i].code)); } - - return GPOINTER_TO_UINT(g_hash_table_lookup(propdict, key)); + return SP_ATTR_INVALID; } unsigned char const * -- cgit v1.2.3 From 6f817f71119774c09888fddf8ba28a96c4546165 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 21 Dec 2015 10:48:56 +0100 Subject: Add option for checkerboard background. Fixed bugs: - https://launchpad.net/bugs/397723 (bzr r14539) --- src/attributes.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/attributes.cpp') diff --git a/src/attributes.cpp b/src/attributes.cpp index e8620a498..dcd644b5d 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -82,6 +82,7 @@ static SPStyleProp const props[] = { {SP_ATTR_FIT_MARGIN_LEFT, "fit-margin-left"}, {SP_ATTR_FIT_MARGIN_RIGHT, "fit-margin-right"}, {SP_ATTR_FIT_MARGIN_BOTTOM, "fit-margin-bottom"}, + {SP_ATTR_INKSCAPE_PAGECHECKERBOARD, "inkscape:checkerboard"}, {SP_ATTR_INKSCAPE_PAGEOPACITY, "inkscape:pageopacity"}, {SP_ATTR_INKSCAPE_PAGESHADOW, "inkscape:pageshadow"}, {SP_ATTR_INKSCAPE_ZOOM, "inkscape:zoom"}, -- cgit v1.2.3 From c5ee3ce4be0f65a00b5908a9051cdb470d805192 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Mon, 28 Dec 2015 09:50:50 +0100 Subject: Corrects attribute name for saving page 'checkerboard' background state. Fixed bugs: - https://launchpad.net/bugs/1529391 (bzr r14556) --- src/attributes.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/attributes.cpp') diff --git a/src/attributes.cpp b/src/attributes.cpp index dcd644b5d..e32f4ece4 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -82,7 +82,7 @@ static SPStyleProp const props[] = { {SP_ATTR_FIT_MARGIN_LEFT, "fit-margin-left"}, {SP_ATTR_FIT_MARGIN_RIGHT, "fit-margin-right"}, {SP_ATTR_FIT_MARGIN_BOTTOM, "fit-margin-bottom"}, - {SP_ATTR_INKSCAPE_PAGECHECKERBOARD, "inkscape:checkerboard"}, + {SP_ATTR_INKSCAPE_PAGECHECKERBOARD, "inkscape:pagecheckerboard"}, {SP_ATTR_INKSCAPE_PAGEOPACITY, "inkscape:pageopacity"}, {SP_ATTR_INKSCAPE_PAGESHADOW, "inkscape:pageshadow"}, {SP_ATTR_INKSCAPE_ZOOM, "inkscape:zoom"}, -- cgit v1.2.3 From 70e49f7eba8a099a9f5e7f9bfd3ec78f3f1ec1a7 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Sat, 9 Jan 2016 10:52:04 +0100 Subject: Support rendering of radial gradients with the 'fr' attribute. New in SVG 2. (bzr r14569) --- src/attributes.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/attributes.cpp') diff --git a/src/attributes.cpp b/src/attributes.cpp index e32f4ece4..646c2ab0c 100644 --- a/src/attributes.cpp +++ b/src/attributes.cpp @@ -294,6 +294,7 @@ static SPStyleProp const props[] = { /* SPRadialGradient */ {SP_ATTR_FX, "fx"}, {SP_ATTR_FY, "fy"}, + {SP_ATTR_FR, "fr"}, /* SPMeshPatch */ {SP_ATTR_TENSOR, "tensor"}, //{SP_ATTR_TYPE, "type"}, -- cgit v1.2.3