diff options
| author | miklosh <miklosh@users.sourceforge.net> | 2007-07-22 11:08:27 +0000 |
|---|---|---|
| committer | miklosh <miklosh@users.sourceforge.net> | 2007-07-22 11:08:27 +0000 |
| commit | cc9b5d6007cacd1b16cbce18adbac16723238e00 (patch) | |
| tree | fe7328d82dc9f8a79bf6faa86eb18f94ba6503e9 /src | |
| parent | Further development of the PDF import module: continued pruning of PdfParser.... (diff) | |
| download | inkscape-cc9b5d6007cacd1b16cbce18adbac16723238e00.tar.gz inkscape-cc9b5d6007cacd1b16cbce18adbac16723238e00.zip | |
Use the #RRGGBB color format instead of rgb() since most extensions don't support the latter
(bzr r3273)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/internal/pdfinput/svg-builder.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp index c67b191e1..02bd06792 100644 --- a/src/extension/internal/pdfinput/svg-builder.cpp +++ b/src/extension/internal/pdfinput/svg-builder.cpp @@ -34,6 +34,7 @@ #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" @@ -129,10 +130,10 @@ Inkscape::XML::Node *SvgBuilder::getContainer() { 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; } |
