[lasem] svg_enums: add comp-op enum.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [lasem] svg_enums: add comp-op enum.
- Date: Sun, 8 Aug 2010 13:27:39 +0000 (UTC)
commit 7ab0b6db08ffdcbcbf920c18587d5b93b3a3e852
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Sun Aug 8 15:26:27 2010 +0200
svg_enums: add comp-op enum.
src/lsmsvgenums.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
src/lsmsvgenums.h | 31 +++++++++++++++++++++++++++++++
2 files changed, 75 insertions(+), 0 deletions(-)
---
diff --git a/src/lsmsvgenums.c b/src/lsmsvgenums.c
index 0f69572..b1f6c09 100644
--- a/src/lsmsvgenums.c
+++ b/src/lsmsvgenums.c
@@ -231,3 +231,47 @@ lsm_svg_meet_or_slice_from_string (const char *string)
return lsm_enum_value_from_string (string, lsm_svg_meet_or_slice_strings,
G_N_ELEMENTS (lsm_svg_meet_or_slice_strings));
}
+
+static const char *lsm_svg_comp_op_strings[] = {
+ "clear",
+ "src",
+ "dst",
+ "src-over",
+ "dst-over",
+ "src-in",
+ "dst-in",
+ "src-out",
+ "dst-out",
+ "src-atop",
+ "dst-atop",
+ "xor",
+ "plus",
+ "multiply",
+ "screen",
+ "overlay",
+ "darken",
+ "lighten",
+ "color-dodge",
+ "color-burn",
+ "hard-light",
+ "soft-light",
+ "difference",
+ "exclusion"
+};
+
+const char *
+lsm_svg_comp_op_to_string (LsmSvgCompOp comp_op)
+{
+ if (comp_op < 0 || comp_op > LSM_SVG_COMP_OP_EXCLUSION)
+ return NULL;
+
+ return lsm_svg_comp_op_strings[comp_op];
+}
+
+LsmSvgCompOp
+lsm_svg_comp_op_from_string (const char *string)
+{
+ return lsm_enum_value_from_string (string, lsm_svg_comp_op_strings,
+ G_N_ELEMENTS (lsm_svg_comp_op_strings));
+}
+
diff --git a/src/lsmsvgenums.h b/src/lsmsvgenums.h
index a755e64..18e150d 100644
--- a/src/lsmsvgenums.h
+++ b/src/lsmsvgenums.h
@@ -164,6 +164,37 @@ typedef enum {
const char * lsm_svg_meet_or_slice_to_string (LsmSvgMeetOrSlice meet_or_slice);
LsmSvgMeetOrSlice lsm_svg_meet_or_slice_from_string (const char *string);
+typedef enum {
+ LSM_SVG_COMP_OP_ERROR = -1,
+ LSM_SVG_COMP_OP_CLEAR,
+ LSM_SVG_COMP_OP_SRC,
+ LSM_SVG_COMP_OP_DST,
+ LSM_SVG_COMP_OP_SRC_OVER,
+ LSM_SVG_COMP_OP_DST_OVER,
+ LSM_SVG_COMP_OP_SRC_IN,
+ LSM_SVG_COMP_OP_DST_IN,
+ LSM_SVG_COMP_OP_SRC_OUT,
+ LSM_SVG_COMP_OP_DST_OUT,
+ LSM_SVG_COMP_OP_SRC_ATOP,
+ LSM_SVG_COMP_OP_DST_ATOP,
+ LSM_SVG_COMP_OP_XOR,
+ LSM_SVG_COMP_OP_PLUS,
+ LSM_SVG_COMP_OP_MULTIPLY,
+ LSM_SVG_COMP_OP_SCREEN,
+ LSM_SVG_COMP_OP_OVERLAY,
+ LSM_SVG_COMP_OP_DARKEN,
+ LSM_SVG_COMP_OP_LIGHTEN,
+ LSM_SVG_COMP_OP_COLOR_DODGE,
+ LSM_SVG_COMP_OP_COLOR_BURN,
+ LSM_SVG_COMP_OP_HARD_LIGHT,
+ LSM_SVG_COMP_OP_SOFT_LIGHT,
+ LSM_SVG_COMP_OP_DIFFERENCE,
+ LSM_SVG_COMP_OP_EXCLUSION
+} LsmSvgCompOp;
+
+const char * lsm_svg_comp_op_to_string (LsmSvgCompOp comp_op);
+LsmSvgCompOp lsm_svg_comp_op_from_string (const char *string);
+
G_END_DECLS
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]