am 8db8bc63: Merge "Skip drawing empty shapes to keep Apple JRE happy." into mnc-ub-dev
* commit '8db8bc63624bbd1d803e02571fa865f1f7fa584c': Skip drawing empty shapes to keep Apple JRE happy.
This commit is contained in:
@@ -35,6 +35,8 @@ import java.awt.RenderingHints;
|
|||||||
import java.awt.Shape;
|
import java.awt.Shape;
|
||||||
import java.awt.geom.AffineTransform;
|
import java.awt.geom.AffineTransform;
|
||||||
import java.awt.geom.Arc2D;
|
import java.awt.geom.Arc2D;
|
||||||
|
import java.awt.geom.Path2D;
|
||||||
|
import java.awt.geom.Rectangle2D;
|
||||||
import java.awt.image.BufferedImage;
|
import java.awt.image.BufferedImage;
|
||||||
|
|
||||||
|
|
||||||
@@ -707,6 +709,12 @@ public final class Canvas_Delegate {
|
|||||||
@Override
|
@Override
|
||||||
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
|
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
|
||||||
Shape shape = pathDelegate.getJavaShape();
|
Shape shape = pathDelegate.getJavaShape();
|
||||||
|
Rectangle2D bounds = shape.getBounds2D();
|
||||||
|
if (bounds.isEmpty()) {
|
||||||
|
// Apple JRE 1.6 doesn't like drawing empty shapes.
|
||||||
|
// http://b.android.com/178278
|
||||||
|
return;
|
||||||
|
}
|
||||||
int style = paintDelegate.getStyle();
|
int style = paintDelegate.getStyle();
|
||||||
|
|
||||||
if (style == Paint.Style.FILL.nativeInt ||
|
if (style == Paint.Style.FILL.nativeInt ||
|
||||||
|
|||||||
Reference in New Issue
Block a user