summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3711b3e)
raw | patch | inline | side by side (parent: 3711b3e)
author | miklosh <miklosh@users.sourceforge.net> | |
Sun, 22 Jul 2007 11:08:27 +0000 (11:08 +0000) | ||
committer | miklosh <miklosh@users.sourceforge.net> | |
Sun, 22 Jul 2007 11:08:27 +0000 (11:08 +0000) |
src/extension/internal/pdfinput/svg-builder.cpp | patch | blob | history |
diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp
index c67b191e16d8b68f0014aebdd7dc9aae0dde7bf2..02bd0679242e55d91a00a8254c34ca4faffa3613 100644 (file)
#include "io/stringstream.h"
#include "io/base64stream.h"
#include "libnr/nr-matrix-ops.h"
+#include "libnr/nr-macros.h"
#include "libnrtype/font-instance.h"
#include "Function.h"
static gchar *svgConvertRGBToText(double r, double g, double b) {
static gchar tmp[1023] = {0};
snprintf(tmp, 1023,
- "rgb(%i, %i, %i)",
- SP_COLOR_F_TO_U(r),
- SP_COLOR_F_TO_U(g),
- SP_COLOR_F_TO_U(b));
+ "#%02x%02x%02x",
+ CLAMP(SP_COLOR_F_TO_U(r), 0, 255),
+ CLAMP(SP_COLOR_F_TO_U(g), 0, 255),
+ CLAMP(SP_COLOR_F_TO_U(b), 0, 255));
return (gchar *)&tmp;
}