342 } 343 } 344 } 345 break; 346 case PathIterator.SEG_CLOSE: 347 if (subpathStarted) { 348 consumer.closedSubpath(); 349 subpathStarted = false; 350 pathClosed = true; 351 } 352 break; 353 } 354 pi.next(); 355 } 356 357 consumer.endPath(); 358 } 359 360 private static Rasterizer theRasterizer; 361 362 public synchronized static Rasterizer getRasterizer() { 363 Rasterizer r = theRasterizer; 364 if (r == null) { 365 r = new Rasterizer(); 366 } else { 367 theRasterizer = null; 368 } 369 return r; 370 } 371 372 public synchronized static void dropRasterizer(Rasterizer r) { 373 r.reset(); 374 theRasterizer = r; 375 } 376 377 /** 378 * {@inheritDoc} 379 */ 380 @Override 381 public float getMinimumAAPenSize() { 382 return MinPenSizeAA; 383 } 384 385 /** 386 * {@inheritDoc} 387 */ 388 @Override 389 public AATileGenerator getAATileGenerator(Shape s, 390 AffineTransform at, 391 Region clip, 392 BasicStroke bs, | 342 } 343 } 344 } 345 break; 346 case PathIterator.SEG_CLOSE: 347 if (subpathStarted) { 348 consumer.closedSubpath(); 349 subpathStarted = false; 350 pathClosed = true; 351 } 352 break; 353 } 354 pi.next(); 355 } 356 357 consumer.endPath(); 358 } 359 360 private static Rasterizer theRasterizer; 361 362 public static synchronized Rasterizer getRasterizer() { 363 Rasterizer r = theRasterizer; 364 if (r == null) { 365 r = new Rasterizer(); 366 } else { 367 theRasterizer = null; 368 } 369 return r; 370 } 371 372 public static synchronized void dropRasterizer(Rasterizer r) { 373 r.reset(); 374 theRasterizer = r; 375 } 376 377 /** 378 * {@inheritDoc} 379 */ 380 @Override 381 public float getMinimumAAPenSize() { 382 return MinPenSizeAA; 383 } 384 385 /** 386 * {@inheritDoc} 387 */ 388 @Override 389 public AATileGenerator getAATileGenerator(Shape s, 390 AffineTransform at, 391 Region clip, 392 BasicStroke bs, |