? output.ps
? ps-background.patch
Index: xap_UnixPSGraphics.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/xap/unix/xap_UnixPSGraphics.cpp,v
retrieving revision 1.61
diff -u -r1.61 xap_UnixPSGraphics.cpp
--- xap_UnixPSGraphics.cpp	2001/02/19 18:12:55	1.61
+++ xap_UnixPSGraphics.cpp	2001/02/20 02:37:54
@@ -579,12 +579,29 @@
 	UT_ASSERT(UT_SHOULD_NOT_HAPPEN);
 }
 
-void PS_Graphics::fillRect(UT_RGBColor& /*c*/, UT_sint32 /*x*/, UT_sint32 /*y*/, UT_sint32 /*w*/, UT_sint32 /*h*/)
+void PS_Graphics::fillRect(UT_RGBColor& c, UT_sint32 x, UT_sint32 y, UT_sint32 w, UT_sint32 h)
 {
+  UT_RGBColor cl = m_currentColor;
+  setColor(c);
+
+  char buf[256];
+  buf[0] = 0;
+
+  sprintf(buf, "%d %d MT\n%d %d LT\n%d %d LT\n%d %d LT\n%d %d LT\nCP\nF\n",
+	  x,y,
+	  x+w, y,
+	  x+w, y+h,
+	  x, y+h,
+	  x, y
+	  );
+  m_ps->writeBytes(buf);
+
+  setColor(cl);
 }
 
-void PS_Graphics::fillRect(UT_RGBColor& /*c*/, UT_Rect & /*r*/)
+void PS_Graphics::fillRect(UT_RGBColor& c, UT_Rect & r)
 {
+  fillRect(c, r.left, r.top, r.width, r.height);
 }
 
 void PS_Graphics::invertRect(const UT_Rect* /*pRect*/)
@@ -917,7 +934,11 @@
 		"       /Encoding ISOLatin1Encoding def",
 		"       currentdict",
 		"       end} bind def",
-		"/EXC {exch definefont pop} bind def"				// Exchange font entry
+		"/EXC {exch definefont pop} bind def",				// Exchange font entry
+		"/CP {closepath} bind def",
+		"/F {fill} bind def",
+		"/LT {neg lineto} bind def",
+		"/MT {neg moveto} bind def"
 	};
 
 	char buf[1024];