OSDN Git Service

AI 146411: Fix BridgeCanvas#drawRoundRect
authorXavier Ducrohet <>
Thu, 16 Apr 2009 05:30:00 +0000 (22:30 -0700)
committerThe Android Open Source Project <initial-contribution@android.com>
Thu, 16 Apr 2009 05:30:00 +0000 (22:30 -0700)
  BUG=1792311

Automated import of CL 146411

tools/layoutlib/bridge/src/com/android/layoutlib/bridge/BridgeCanvas.java

index 70c26a7..4710691 100644 (file)
@@ -650,12 +650,12 @@ public class BridgeCanvas extends Canvas {
         int arcHeight = (int)(ry * 2);
         
         if (style == Style.FILL || style == Style.FILL_AND_STROKE) {
-            g.fillRoundRect((int)rect.left, (int)rect.right, (int)rect.width(), (int)rect.height(),
+            g.fillRoundRect((int)rect.left, (int)rect.top, (int)rect.width(), (int)rect.height(),
                     arcWidth, arcHeight);
         }
 
         if (style == Style.STROKE || style == Style.FILL_AND_STROKE) {
-            g.drawRoundRect((int)rect.left, (int)rect.right, (int)rect.width(), (int)rect.height(),
+            g.drawRoundRect((int)rect.left, (int)rect.top, (int)rect.width(), (int)rect.height(),
                     arcWidth, arcHeight);
         }