xpts[k] = scaleX * (vpX + xOffset + mr.elementAt( offset + k*2 ) );
ypts[k] = scaleY * (vpY + yOffset + mr.elementAt( offset + k*2+1 ) );
}
offset += count*2;
Polygon2D pol = new Polygon2D(xpts, ypts, count);
v.add(pol);
}
/* need to do this for POLYPOLYGON, because only
* GeneralPaths can handle filling for complex WMF shapes, so
* we need to get all the Polygons and then convert them to a GeneralPath
*/
if ( brushObject >= 0 ) {
setBrushPaint( currentStore, g2d, brushObject );
fillPolyPolygon(g2d, v);
firstEffectivePaint = false;
}
// painting with NULL PEN
if (penObject >= 0) {
setPenColor( currentStore, g2d, penObject );
drawPolyPolygon(g2d, v);
firstEffectivePaint = false;
}
break;
}
case WMFConstants.META_POLYGON:
{
int count = mr.elementAt( 0 );
float[] _xpts = new float[ count ];
float[] _ypts = new float[ count ];
for ( int k = 0; k < count; k++ ) {
_xpts[k] = scaleX * ( vpX + xOffset + mr.elementAt( k*2+1 ) );
_ypts[k] = scaleY * ( vpY + yOffset + mr.elementAt( k*2+2 ) );
}
Polygon2D pol = new Polygon2D(_xpts, _ypts, count);
paint(brushObject, penObject, pol, g2d);
}
break;
case WMFConstants.META_MOVETO: