summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavmjong Bah <tavmjong@free.fr>2014-11-12 19:26:25 +0000
committertavmjong-free <tavmjong@free.fr>2014-11-12 19:26:25 +0000
commit320bacdb7957098144ee11a015c6614af4f1e6ea (patch)
tree75640e795119096e4256728382ca8255082df087
parentFix a bug releasing LPE clip and mask (diff)
downloadinkscape-320bacdb7957098144ee11a015c6614af4f1e6ea.tar.gz
inkscape-320bacdb7957098144ee11a015c6614af4f1e6ea.zip
Add new text decoration properties.
(bzr r13706)
-rwxr-xr-xshare/attributes/genMapDataCSS.pl26
-rw-r--r--src/style-internal.h12
2 files changed, 35 insertions, 3 deletions
diff --git a/share/attributes/genMapDataCSS.pl b/share/attributes/genMapDataCSS.pl
index 9b013c758..438c26d04 100755
--- a/share/attributes/genMapDataCSS.pl
+++ b/share/attributes/genMapDataCSS.pl
@@ -210,6 +210,32 @@ push @{$properties{ "solid-opacity" }->{elements}}, @graphics_elements;
$properties{ "solid-opacity" }->{default} = "1.0";
$properties{ "solid-opacity" }->{inherit} = "no";
+# CSS Text Decoration
+push @{$properties{ "text-decoration-line" }->{elements}}, @container_elements;
+push @{$properties{ "text-decoration-line" }->{elements}}, @text_content_elements;
+$properties{ "text-decoration-line" }->{default} = "none";
+$properties{ "text-decoration-line" }->{inherit} = "no";
+
+push @{$properties{ "text-decoration-color" }->{elements}}, @container_elements;
+push @{$properties{ "text-decoration-color" }->{elements}}, @text_content_elements;
+$properties{ "text-decoration-color" }->{default} = "NO_DEFAULT";
+$properties{ "text-decoration-color" }->{inherit} = "no";
+
+push @{$properties{ "text-decoration-style" }->{elements}}, @container_elements;
+push @{$properties{ "text-decoration-style" }->{elements}}, @text_content_elements;
+$properties{ "text-decoration-color" }->{default} = "solid";
+$properties{ "text-decoration-color" }->{inherit} = "no";
+
+push @{$properties{ "text-decoration-fill" }->{elements}}, @container_elements;
+push @{$properties{ "text-decoration-fill" }->{elements}}, @text_content_elements;
+$properties{ "text-decoration-fill" }->{default} = "NO_DEFAULT";
+$properties{ "text-decoration-fill" }->{inherit} = "no";
+
+push @{$properties{ "text-decoration-stroke" }->{elements}}, @container_elements;
+push @{$properties{ "text-decoration-stroke" }->{elements}}, @text_content_elements;
+$properties{ "text-decoration-stroke" }->{default} = "NO_DEFAULT";
+$properties{ "text-decoration-stroke" }->{inherit} = "no";
+
# Output
diff --git a/src/style-internal.h b/src/style-internal.h
index 32792827a..faae76ac5 100644
--- a/src/style-internal.h
+++ b/src/style-internal.h
@@ -36,6 +36,12 @@ static const unsigned SP_STYLE_FLAG_ALWAYS (1 << 2);
static const unsigned SP_STYLE_FLAG_IFSET (1 << 0);
static const unsigned SP_STYLE_FLAG_IFDIFF (1 << 1);
+enum SPStyleSrc {
+ SP_STYLE_SRC_UNSET,
+ SP_STYLE_SRC_STYLE_PROP,
+ SP_STYLE_SRC_STYLE_SHEET,
+ SP_STYLE_SRC_ATTRIBUTE
+};
/* General comments:
*
@@ -113,7 +119,7 @@ public:
inherits(inherits),
set(false),
inherit(false),
- style_att(false),
+ style_src(SP_STYLE_SRC_UNSET),
style(NULL)
{}
@@ -150,7 +156,7 @@ public:
inherits = rhs.inherits;
set = rhs.set;
inherit = rhs.inherit;
- style_att = rhs.style_att;
+ style_src = rhs.style_src;
style = rhs.style;
return *this;
}
@@ -170,7 +176,7 @@ public:
unsigned inherits : 1; // Property inherits by default from parent.
unsigned set : 1; // Property has been explicitly set (vs. inherited).
unsigned inherit : 1; // Property value set to 'inherit'.
- unsigned style_att : 2; // Source (attribute, style attribute, style-sheet). NOT USED YET FIX ME
+ SPStyleSrc style_src : 2; // Source (attribute, style attribute, style-sheet). NOT USED YET FIX ME
// To do: make private after g_asserts removed
public: