r22617 by jghali - increase numeric precision when exporting spot colors to PDF
scribus-commit
scribus-commit at lists.scribus.net
Sun Aug 5 20:34:58 UTC 2018
Author: jghali
Date: Sun Aug 5 20:34:58 2018
New Revision: 22617
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22617
Log:
increase numeric precision when exporting spot colors to PDF
Modified:
trunk/Scribus/scribus/pdflib_core.cpp
Modified: trunk/Scribus/scribus/pdflib_core.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22617&path=/trunk/Scribus/scribus/pdflib_core.cpp
==============================================================================
--- trunk/Scribus/scribus/pdflib_core.cpp (original)
+++ trunk/Scribus/scribus/pdflib_core.cpp Sun Aug 5 20:34:58 2018
@@ -2537,15 +2537,13 @@
const ScColor& colorToUse = itf.value();
if ((colorToUse.isSpotColor()) || (colorToUse.isRegistrationColor()))
{
- CMYKColor cmykValues;
- int cc, cm, cy, ck;
+ CMYKColorF cmykValues;
PdfSpotC spotD;
ScColorEngine::getCMYKValues(colorToUse, &doc, cmykValues);
- cmykValues.getValues(cc, cm, cy, ck);
- QByteArray colorDesc = "{\ndup "+FToStr(static_cast<double>(cc) / 255)+"\nmul exch dup ";
- colorDesc += FToStr(static_cast<double>(cm) / 255)+"\nmul exch dup ";
- colorDesc += FToStr(static_cast<double>(cy) / 255)+"\nmul exch ";
- colorDesc += FToStr(static_cast<double>(ck) / 255)+" mul }";
+ QByteArray colorDesc = "{\ndup " + FToStr(cmykValues.c) + "\nmul exch dup ";
+ colorDesc += FToStr(cmykValues.m) + "\nmul exch dup ";
+ colorDesc += FToStr(cmykValues.y) + "\nmul exch ";
+ colorDesc += FToStr(cmykValues.k) + " mul }";
PdfId separationFunction = writer.newObject();
writer.startObj(separationFunction);
PutDoc("<<\n/FunctionType 4\n");
More information about the scribus-commit
mailing list