      */
     public function getBoundsXAtSize(width:Number, height:Number, postLayoutTransform:Boolean = true):Number
     {
-        var strokeExtents:Point = getStrokeExtents(postLayoutTransform);
+        var strokeExtents:Rectangle = getStrokeExtents(postLayoutTransform);
         var m:Matrix = getComplexMatrix(postLayoutTransform); 
         if (!m)
-            return strokeExtents.x * -0.5 + this.measuredX + this.x;
+            return strokeExtents.left + this.measuredX + this.x;
 
         if (!isNaN(width))
-            width -= strokeExtents.x;
+            width -= strokeExtents.width;
 
         if (!isNaN(height))
-            height -= strokeExtents.y;
+            height -= strokeExtents.height;
 
         // Calculate the width and height pre-transform:
         var newSize:Point = MatrixUtil.fitBounds(width, height, m,

    public function getLayoutBoundsY(postLayoutTransform:Boolean = true):Number
    {
        // Take stroke into account:
        // FIXME (egeorgie): We assume that the stroke extents are even on both sides.
        // and that's not necessarily true.
        var stroke:Number = -getStrokeExtents(postLayoutTransform).y * 0.5;

        var m:Matrix = getComplexMatrix(postLayoutTransform);
        if (!m)


        var topLeft:Point = new Point(measuredX, measuredY);
        MatrixUtil.transformBounds(newSize, m, topLeft);
        return strokeExtents.left + topLeft.x;
    }
    
    /**
