This commit is contained in:
2014-02-28 17:07:02 +04:00
parent 6d9b35abd6
commit d817704941
2 changed files with 2 additions and 2 deletions

View File

@@ -66,7 +66,7 @@ class DefaultLayout implements ILayout {
case VAlign.TOP: case VAlign.TOP:
view.y = group.topPadding + view.topMargin; view.y = group.topPadding + view.topMargin;
case VAlign.MIDDLE: case VAlign.MIDDLE:
view.y = (group.height - view.height) / 2 + (group.topPadding - group.topPadding) + (view.bottomMargin - view.bottomMargin); view.y = (group.height - view.height) / 2 + (group.topPadding - group.bottomPadding) + (view.topMargin - view.bottomMargin);
case VAlign.BOTTOM: case VAlign.BOTTOM:
view.y = group.height - view.height - group.bottomPadding - view.bottomMargin; view.y = group.height - view.height - group.bottomPadding - view.bottomMargin;
case VAlign.NONE: case VAlign.NONE:

View File

@@ -46,7 +46,7 @@ class DrawUtil {
var dx:Float = (rect.width - image.width * s) / 2; var dx:Float = (rect.width - image.width * s) / 2;
var dy:Float = (rect.height - image.height * s) / 2; var dy:Float = (rect.height - image.height * s) / 2;
m.translate(dx, dy); m.translate(dx, dy);
graphics.beginBitmapFill(image, m, false, false); graphics.beginBitmapFill(image, m, false, true);
rect.x = Math.max(rect.x, m.tx); rect.x = Math.max(rect.x, m.tx);
rect.y = Math.max(rect.y, m.ty); rect.y = Math.max(rect.y, m.ty);
rect.width = Math.min(rect.width, image.width * s); rect.width = Math.min(rect.width, image.width * s);