summaryrefslogtreecommitdiffstats
path: root/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
diff options
context:
space:
mode:
authorXavier Ducrohet <xav@android.com>2012-02-02 15:44:50 -0800
committerXavier Ducrohet <xav@android.com>2012-02-02 17:45:45 -0800
commit46d43ccfd8cef75b4315828073c094cf1efb05ff (patch)
tree572565d2d3cfc8db8423cfc9aac3386837d8ab46 /tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
parentc69acaef0b31af922931461c11f075e436642fef (diff)
downloadframeworks_base-46d43ccfd8cef75b4315828073c094cf1efb05ff.zip
frameworks_base-46d43ccfd8cef75b4315828073c094cf1efb05ff.tar.gz
frameworks_base-46d43ccfd8cef75b4315828073c094cf1efb05ff.tar.bz2
Make Layoutlib compile on Java 6.
Change-Id: Ic8f0e321c6c218de83664fc01f253a07fa80852c
Diffstat (limited to 'tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java')
-rw-r--r--tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
index f797836..16f1575 100644
--- a/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
+++ b/tools/layoutlib/bridge/src/android/graphics/Canvas_Delegate.java
@@ -291,6 +291,7 @@ public final class Canvas_Delegate {
Paint paint) {
draw(thisCanvas.mNativeCanvas, paint.mNativePaint, false /*compositeOnly*/,
false /*forceSrcMode*/, new GcSnapshot.Drawable() {
+ @Override
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
for (int i = 0 ; i < count ; i += 4) {
graphics.drawLine((int)pts[i + offset], (int)pts[i + offset + 1],
@@ -619,6 +620,7 @@ public final class Canvas_Delegate {
final int h = canvasDelegate.mBitmap.getImage().getHeight();
draw(nativeCanvas, new GcSnapshot.Drawable() {
+ @Override
public void draw(Graphics2D graphics, Paint_Delegate paint) {
// reset its transform just in case
graphics.setTransform(new AffineTransform());
@@ -651,6 +653,7 @@ public final class Canvas_Delegate {
draw(nativeCanvas, paint, false /*compositeOnly*/, false /*forceSrcMode*/,
new GcSnapshot.Drawable() {
+ @Override
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
graphics.drawLine((int)startX, (int)startY, (int)stopX, (int)stopY);
}
@@ -669,6 +672,7 @@ public final class Canvas_Delegate {
draw(nativeCanvas, paint, false /*compositeOnly*/, false /*forceSrcMode*/,
new GcSnapshot.Drawable() {
+ @Override
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
int style = paintDelegate.getStyle();
@@ -693,6 +697,7 @@ public final class Canvas_Delegate {
if (oval.right > oval.left && oval.bottom > oval.top) {
draw(nativeCanvas, paint, false /*compositeOnly*/, false /*forceSrcMode*/,
new GcSnapshot.Drawable() {
+ @Override
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
int style = paintDelegate.getStyle();
@@ -728,6 +733,7 @@ public final class Canvas_Delegate {
if (oval.right > oval.left && oval.bottom > oval.top) {
draw(nativeCanvas, paint, false /*compositeOnly*/, false /*forceSrcMode*/,
new GcSnapshot.Drawable() {
+ @Override
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
int style = paintDelegate.getStyle();
@@ -757,6 +763,7 @@ public final class Canvas_Delegate {
draw(nativeCanvas, paint, false /*compositeOnly*/, false /*forceSrcMode*/,
new GcSnapshot.Drawable() {
+ @Override
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
int style = paintDelegate.getStyle();
@@ -789,6 +796,7 @@ public final class Canvas_Delegate {
draw(nativeCanvas, paint, false /*compositeOnly*/, false /*forceSrcMode*/,
new GcSnapshot.Drawable() {
+ @Override
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
Shape shape = pathDelegate.getJavaShape();
int style = paintDelegate.getStyle();
@@ -892,6 +900,7 @@ public final class Canvas_Delegate {
draw(nativeCanvas, nativePaintOrZero, true /*compositeOnly*/, false /*forceSrcMode*/,
new GcSnapshot.Drawable() {
+ @Override
public void draw(Graphics2D graphics, Paint_Delegate paint) {
if (paint != null && paint.isFilterBitmap()) {
graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
@@ -931,6 +940,7 @@ public final class Canvas_Delegate {
final AffineTransform mtx = matrixDelegate.getAffineTransform();
canvasDelegate.getSnapshot().draw(new GcSnapshot.Drawable() {
+ @Override
public void draw(Graphics2D graphics, Paint_Delegate paint) {
if (paint != null && paint.isFilterBitmap()) {
graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION,
@@ -970,6 +980,7 @@ public final class Canvas_Delegate {
final float startX, final float startY, int flags, int paint) {
draw(nativeCanvas, paint, false /*compositeOnly*/, false /*forceSrcMode*/,
new GcSnapshot.Drawable() {
+ @Override
public void draw(Graphics2D graphics, Paint_Delegate paintDelegate) {
// WARNING: the logic in this method is similar to Paint_Delegate.measureText.
// Any change to this method should be reflected in Paint.measureText
@@ -1279,6 +1290,7 @@ public final class Canvas_Delegate {
draw(nativeCanvas, nativePaintOrZero, true /*compositeOnly*/, sBoolOut[0],
new GcSnapshot.Drawable() {
+ @Override
public void draw(Graphics2D graphics, Paint_Delegate paint) {
if (paint != null && paint.isFilterBitmap()) {
graphics.setRenderingHint(RenderingHints.KEY_INTERPOLATION,