You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xmlgraphics.apache.org by je...@apache.org on 2008/01/10 11:14:21 UTC
svn commit: r610740 -
/xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/ps/dsc/events/DSCCommentBoundingBox.java
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