groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Groff] color fill patch and pic.ms updates


From: Gaius Mulley
Subject: [Groff] color fill patch and pic.ms updates
Date: Fri, 11 Jan 2002 15:30:44 +0000

Hi,

I believe this fixes the reported color bugs (thanks to those people
who have sent in test code). The fix is not to use the BL or fill
commands but to always force FL and FC. Also is a patch for the
documentation pic.ms which fixes an example to match its description.
And also altered the jumper binary description so there is no
duplicate of bit number 2.

please can people verify the color patch.. thanks

Gaius


--- groff-cvs/src/devices/grops/ps.cc   Fri Oct  5 15:12:17 2001
+++ groff-html/src/devices/grops/ps.cc  Fri Jan 11 15:10:30 2002
@@ -922,22 +922,18 @@
 
 void ps_printer::fill_path()
 {
-  double c, m, y, k;
-  fill_color->get_cmyk(&c, &m, &y, &k);
+  double k;
+
   if (fill_color->is_gray()) {
-    if (k == 1.0)
-      out.put_symbol("BL");    
-    else
-      out.put_float(1.0-k)
-        .put_symbol("FL");
+    fill_color->get_gray(&k);
+    output_color->set_gray(k);
+
+    out.put_float(1.0-k)
+      .put_symbol("FL");
   }
   else {
-    if (output_color->is_equal(fill_color))
-      out.put_symbol("fill");
-    else {
-      set_color(fill_color, 0);
-      out.put_symbol("FC");
-    }
+    set_color(fill_color, 0);
+    out.put_symbol("FC");
   }
 }
 
--- groff-cvs/doc/pic.ms        Fri Oct  5 22:42:29 2001
+++ groff-html/doc/pic.ms       Fri Jan 11 13:51:42 2002
@@ -637,7 +637,7 @@
 values are darker; GNU \fBfillval\fP uses 0 for white and 1 for black.
 .KS
 .PS
-circle fill; move; circle fill 0.4; move; circle fill 0.2;  
+circle fill; move; circle fill 0.4; move; circle fill 0.9;
 .PE
 .CE "5: \fBcircle fill; move; circle fill 0.4; move; circle fill 0.9;\fR"
 .PP
@@ -1463,7 +1463,7 @@
 
     # Use {} to avoid changing position from last box draw.
     # This is necessary so move in any direction will work as expected
-    {"Jumpers in state $1$2$2$3$4$5$6" at last box .s + (0, -0.2);}
+    {"Jumpers in state $1$2$3$4$5$6" at last box .s + (0, -0.2);}
 }
 
 # Sample macro invocations
@@ -1506,7 +1506,7 @@
 
     # Use {} to avoid changing position from last box draw.
     # This is necessary so move in any direction will work as expected
-    {"Jumpers in state $1$2$2$3$4$5$6" at last box .s + (0, -0.2);}
+    {"Jumpers in state $1$2$3$4$5$6" at last box .s + (0, -0.2);}
 }
 
 # Sample macro invocations

reply via email to

[Prev in Thread] Current Thread [Next in Thread]