Bug 14511 - PDF_SetLineColor colormodel
PDF_SetLineColor colormodel
Status: RESOLVED FIXED
Product: R
Classification: Unclassified
Component: Graphics
R 2.12.1 patched
All All
: P5 minor
Assigned To: R-core
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-23 23:34 UTC by Philip Johnson
Modified: 2011-02-25 04:10 UTC (History)
0 users

See Also:


Attachments
patch to add curly braces (594 bytes, application/octet-stream)
2011-02-23 23:34 UTC, Philip Johnson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Johnson 2011-02-23 23:34:52 UTC
Created attachment 1177 [details]
patch to add curly braces

High-level symptom:
   Creating a PDF under the "gray" colormodel converts fill colors to gray, but strokes remain colorful.


Bug:
in src/library/grDevices/src/devPS.c

The function PDF_SetLineColor checks if colormodel gray or cmyk and otherwise assumes rgb.  The final "else" appears to be missing curly braces, which results in the rgb color being set in the PDF command stream regardless of the colormodel.  Indenting and the existence of braces in the analogous PDF_SetFill function implies that this is bug rather than a feature.

Patch attached relative to this R-devel:
Revision: 54548
Last Changed Date: 2011-02-22
Comment 1 Simon Urbanek 2011-02-25 04:10:14 UTC
Thanks, now fixed in R-devel (r54576)