xmlgraphics-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r610740 - /xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/dsc/events/DSCCommentBoundingBox.java
Date Thu, 10 Jan 2008 10:14:21 GMT
Author: jeremias
Date: Thu Jan 10 02:14:20 2008
New Revision: 610740

URL: http://svn.apache.org/viewvc?rev=610740&view=rev
Log:
Finetuning: Make sure the hi-res bounding box is within the limits of the low-res bounding
box.

Modified:
    xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/dsc/events/DSCCommentBoundingBox.java

Modified: xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/dsc/events/DSCCommentBoundingBox.java
URL: http://svn.apache.org/viewvc/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/dsc/events/DSCCommentBoundingBox.java?rev=610740&r1=610739&r2=610740&view=diff
==============================================================================
--- xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/dsc/events/DSCCommentBoundingBox.java
(original)
+++ xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/dsc/events/DSCCommentBoundingBox.java
Thu Jan 10 02:14:20 2008
@@ -90,10 +90,10 @@
     public void generate(PSGenerator gen) throws IOException {
         if (getBoundingBox() != null) {
             gen.writeDSCComment(getName(), new Object[] {
-                new Integer((int)Math.round(this.bbox.getX())),
-                new Integer((int)Math.round(this.bbox.getY())),
-                new Integer((int)Math.round(this.bbox.getX() + this.bbox.getWidth())),
-                new Integer((int)Math.round(this.bbox.getY() + this.bbox.getHeight()))});
+                new Integer((int)Math.floor(this.bbox.getX())),
+                new Integer((int)Math.floor(this.bbox.getY())),
+                new Integer((int)Math.ceil(this.bbox.getX() + this.bbox.getWidth())),
+                new Integer((int)Math.ceil(this.bbox.getY() + this.bbox.getHeight()))});
         } else {
             gen.writeDSCComment(getName(), DSCConstants.ATEND);
         }



---------------------------------------------------------------------
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
To unsubscribe, e-mail: commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: commits-help@xmlgraphics.apache.org


Mime
View raw message