[ease] Fix HTML export to work with colors not in #RRGGBBAA format.
- From: Nate Stedman <natesm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ease] Fix HTML export to work with colors not in #RRGGBBAA format.
- Date: Wed, 19 May 2010 08:47:37 +0000 (UTC)
commit 200cb682f12d5e6764fa6850d8e6466e99126fd6
Author: Nate Stedman <natesm gmail com>
Date: Wed May 19 04:47:27 2010 -0400
Fix HTML export to work with colors not in #RRGGBBAA format.
src/libease/Element.vala | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/src/libease/Element.vala b/src/libease/Element.vala
index 092ca97..5ab32b4 100644
--- a/src/libease/Element.vala
+++ b/src/libease/Element.vala
@@ -109,8 +109,12 @@ public class Ease.Element : GLib.Object
html += " position: absolute;";
// set the text-specific properties of the element
- html += " color:" + data.get("color").substring(0, 7) +
- ";";
+ string c = data.get("color");
+ if (c.length > 7) // clip the string if alpha is included
+ {
+ c = c.substring(0, 7);
+ }
+ html += " color:" + c + ";";
html += " font-family:'" + data.get("font_name") +
"', sans-serif;";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]