You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by de...@apache.org on 2009/05/17 15:24:44 UTC
svn commit: r775642 - in /xmlgraphics/batik/trunk: CHANGES
sources/org/apache/batik/ext/awt/geom/RectListManager.java
sources/org/apache/batik/gvt/renderer/MacRenderer.java
Author: deweese
Date: Sun May 17 13:24:43 2009
New Revision: 775642
URL: http://svn.apache.org/viewvc?rev=775642&view=rev
Log:
Simple code cleanup to fix Bugs 47201, 47202.
1) Pay attention to affine passed into MacRenderer constructor.
2) Avoid unneeded Rectangle allocationn in RectListManager.
Thanks To Dave Brosius.
Modified:
xmlgraphics/batik/trunk/CHANGES
xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/geom/RectListManager.java
xmlgraphics/batik/trunk/sources/org/apache/batik/gvt/renderer/MacRenderer.java
Modified: xmlgraphics/batik/trunk/CHANGES
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/CHANGES?rev=775642&r1=775641&r2=775642&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/CHANGES (original)
+++ xmlgraphics/batik/trunk/CHANGES Sun May 17 13:24:43 2009
@@ -11,7 +11,8 @@
43411, 44553, 44590, 44919, 44936, 44966, 45112, 45114, 45117,
45397, 45520, 45883, 45958, 46072, 46124, 46430, 46431, 46855,
- 46871
+ 46871, 47201, 47202
+
2. New features
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/geom/RectListManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/geom/RectListManager.java?rev=775642&r1=775641&r2=775642&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/geom/RectListManager.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/ext/awt/geom/RectListManager.java Sun May 17 13:24:43 2009
@@ -613,9 +613,8 @@
public void mergeRects(int overhead, int lineOverhead) {
if (size == 0) return;
- Rectangle r, cr, mr;
+ Rectangle r, cr;
int cost1, cost2, cost3;
- mr = new Rectangle();
Rectangle []splits = new Rectangle[4];
for (int j, i=0; i<size; i++) {
r = rects[i];
@@ -637,7 +636,7 @@
(cr.height*lineOverhead) +
(cr.height*cr.width));
- mr = r.union(cr);
+ Rectangle mr = r.union(cr);
cost3 = (overhead +
(mr.height*lineOverhead) +
(mr.height*mr.width));
Modified: xmlgraphics/batik/trunk/sources/org/apache/batik/gvt/renderer/MacRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/sources/org/apache/batik/gvt/renderer/MacRenderer.java?rev=775642&r1=775641&r2=775642&view=diff
==============================================================================
--- xmlgraphics/batik/trunk/sources/org/apache/batik/gvt/renderer/MacRenderer.java (original)
+++ xmlgraphics/batik/trunk/sources/org/apache/batik/gvt/renderer/MacRenderer.java Sun May 17 13:24:43 2009
@@ -84,8 +84,8 @@
AffineTransform at){
renderingHints = new RenderingHints(null);
renderingHints.add(rh);
- if (at == null) at = new AffineTransform();
- else at = new AffineTransform(at);
+ if (at == null) usr2dev = new AffineTransform();
+ else usr2dev = new AffineTransform(at);
}
public void dispose() {