You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by vh...@apache.org on 2004/04/06 13:33:53 UTC
cvs commit: xml-batik/sources/org/apache/batik/transcoder/wmf/tosvg WMFPainter.java
vhardy 2004/04/06 04:33:53
Modified: sources/org/apache/batik/transcoder/wmf/tosvg
WMFPainter.java
Log:
Reverted to previous version. Proposed new version does not compile
Revision Changes Path
1.9 +24 -28 xml-batik/sources/org/apache/batik/transcoder/wmf/tosvg/WMFPainter.java
Index: WMFPainter.java
===================================================================
RCS file: /home/cvs/xml-batik/sources/org/apache/batik/transcoder/wmf/tosvg/WMFPainter.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- WMFPainter.java 31 Mar 2004 16:44:06 -0000 1.8
+++ WMFPainter.java 6 Apr 2004 11:33:53 -0000 1.9
@@ -209,7 +209,7 @@
catch ( Exception e ) {}
int brushStyle = mr.ElementAt( 0 ).intValue();
if ( brushStyle == 0 ) {
- addObjectAt(currentStore, BRUSH,
+ addObjectAt(currentStore, BRUSH,
new Color(mr.ElementAt( 1 ).intValue(),
mr.ElementAt( 2 ).intValue(),
mr.ElementAt( 3 ).intValue()),
@@ -329,31 +329,28 @@
case WMFConstants.META_POLYPOLYGON:
{
- int numPolygons = mr.ElementAt( 0 ).intValue();
- int[] pts = new int[ numPolygons ];
- for ( int ip = 0; ip < numPolygons; ip++ )
- pts[ ip ] = mr.ElementAt( ip + 1 ).intValue();
-
- GeneralPath gp = new GeneralPath();
- int offset = numPolygons+1;
- for ( int j = 0; j < numPolygons; j++ ) {
- int count = pts[ j ];
- int[] xpts = new int[ count ];
- int[] ypts = new int[ count ];
- for ( int k = 0; k < count; k++ ) {
- xpts[k] = (int)( scaleX * ( vpX + mr.ElementAt( offset + k*2 ).intValue()));
- ypts[k] = (int)( scaleY * ( vpY + mr.ElementAt( offset + k*2+1 ).intValue()));
- }
- offset += count;
- Polygon p = new Polygon(xpts, ypts, count);
- gp.append( p, true );
- }
- if ( brushObject >= 0 ) {
- setBrushColor( currentStore, g, brushObject );
- ( (Graphics2D) g).fill(gp);
- }
- setPenColor( currentStore, g, penObject );
- ( (Graphics2D) g).draw(gp);
+ int numPolygons = mr.ElementAt( 0 ).intValue();
+ int[] pts = new int[ numPolygons ];
+ for ( int ip = 0; ip < numPolygons; ip++ )
+ pts[ ip ] = mr.ElementAt( ip + 1 ).intValue();
+
+ int offset = numPolygons+1;
+ for ( int j = 0; j < numPolygons; j++ ) {
+ int count = pts[ j ];
+ int[] xpts = new int[ count ];
+ int[] ypts = new int[ count ];
+ for ( int k = 0; k < count; k++ ) {
+ xpts[k] = (int)( scaleX * ( vpX + mr.ElementAt( offset + k*2 ).intValue()));
+ ypts[k] = (int)( scaleY * ( vpY + mr.ElementAt( offset + k*2+1 ).intValue()));
+ }
+ offset += count;
+ if ( brushObject >= 0 ) {
+ setBrushColor( currentStore, g, brushObject );
+ g.fillPolygon( xpts, ypts, count );
+ }
+ setPenColor( currentStore, g, penObject );
+ g.drawPolygon( xpts, ypts, count );
+ }
}
break;
@@ -779,5 +776,4 @@
Object obj;
int type = 0;
}
-
---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org