diff -r d56a5ce04167 javafx-sg-prism/src/com/sun/javafx/sg/prism/NGRegion.java
--- a/javafx-sg-prism/src/com/sun/javafx/sg/prism/NGRegion.java	Mon Sep 10 12:25:33 2012 -0700
+++ b/javafx-sg-prism/src/com/sun/javafx/sg/prism/NGRegion.java	Mon Sep 10 14:46:49 2012 -0700
@@ -974,39 +974,48 @@
                                    0, 0, leftSlice, topSlice, // src image bounds
                                    0, 0, leftWidth, topWidth); // tile bounds
                         // paint top slice
-                        paintTiles(g, img, ib.getRepeatX(), BorderRepeat.STRETCH, Side.LEFT, Side.TOP,
-                                   centerMinX, topInset, centerW, topWidth,
-                                   leftSlice, 0, centerSliceWidth, topSlice,
-                                   0, 0, (ib.getRepeatX() == BorderRepeat.STRETCH) ?
-                                        centerW : (centerSliceWidth * topWidth) / topSlice, topWidth);
+                        float tileWidth = (ib.getRepeatX() == BorderRepeat.STRETCH) ?
+                                centerW : (centerSliceWidth * topWidth) / topSlice;
+                        float tileHeight = topWidth;
+                        paintTiles(
+                                g, img, ib.getRepeatX(), BorderRepeat.STRETCH, Side.LEFT, Side.TOP,
+                                centerMinX, topInset, centerW, topWidth,
+                                leftSlice, 0, centerSliceWidth, topSlice,
+                                (centerW - tileWidth) / 2, 0, tileWidth, tileHeight);
                         // paint top right corner
                         paintTiles(g, img, BorderRepeat.STRETCH, BorderRepeat.STRETCH, Side.LEFT, Side.TOP,
                                    centerMaxX, topInset, rightWidth, topWidth,
                                    (img.getWidth() - rightSlice), 0, rightSlice, topSlice,
                                    0, 0, rightWidth, topWidth);
                         // paint left slice
+                        tileWidth = leftWidth;
+                        tileHeight = (ib.getRepeatY() == BorderRepeat.STRETCH) ?
+                                centerH : (leftWidth * centerSliceHeight) / leftSlice;
                         paintTiles(g, img, BorderRepeat.STRETCH, ib.getRepeatY(), Side.LEFT, Side.TOP,
                                    leftInset, centerMinY, leftWidth, centerH,
                                    0, topSlice, leftSlice, centerSliceHeight,
-                                   0, 0, leftWidth, (ib.getRepeatY() == BorderRepeat.STRETCH) ?
-                                        centerH : (leftWidth * centerSliceHeight) / leftSlice);
+                                   0, (centerH - tileHeight) / 2, tileWidth, tileHeight);
                         // paint right slice
+                        tileWidth = rightWidth;
+                        tileHeight = (ib.getRepeatY() == BorderRepeat.STRETCH) ?
+                                centerH : (rightWidth * centerSliceHeight) / rightSlice;
                         paintTiles(g, img, BorderRepeat.STRETCH, ib.getRepeatY(), Side.LEFT, Side.TOP,
                                    centerMaxX, centerMinY, rightWidth, centerH,
                                    img.getWidth() - rightSlice, topSlice, rightSlice, centerSliceHeight,
-                                   0, 0, rightWidth, (ib.getRepeatY() == BorderRepeat.STRETCH) ?
-                                        centerH : (rightWidth * centerSliceHeight) / rightSlice);
+                                   0, (centerH - tileHeight) / 2, tileWidth, tileHeight);
                         // paint bottom left corner
                         paintTiles(g, img, BorderRepeat.STRETCH, BorderRepeat.STRETCH, Side.LEFT, Side.TOP,
                                    leftInset, centerMaxY, leftWidth, bottomWidth,
                                    0, img.getHeight() - bottomSlice, leftSlice, bottomSlice,
                                    0, 0, leftWidth, bottomWidth);
                         // paint bottom slice
+                        tileWidth = (ib.getRepeatX() == BorderRepeat.STRETCH) ?
+                                centerW : (centerSliceWidth * bottomWidth) / bottomSlice;
+                        tileHeight = bottomWidth;
                         paintTiles(g, img, ib.getRepeatX(), BorderRepeat.STRETCH, Side.LEFT, Side.TOP,
                                    centerMinX, centerMaxY, centerW, bottomWidth,
                                    leftSlice, img.getHeight() - bottomSlice, centerSliceWidth, bottomSlice,
-                                   0, 0, (ib.getRepeatX() == BorderRepeat.STRETCH) ?
-                                        centerW : (centerSliceWidth * bottomWidth) / bottomSlice, bottomWidth);
+                                   (centerW - tileWidth) / 2, 0, tileWidth, tileHeight);
                         // paint bottom right corner
                         paintTiles(g, img, BorderRepeat.STRETCH, BorderRepeat.STRETCH, Side.LEFT, Side.TOP,
                                    centerMaxX, centerMaxY, rightWidth, bottomWidth,
@@ -1393,13 +1402,16 @@
 
             // Based on the repeat mode, populate the above variables
             if (repeatX == BackgroundRepeat.REPEAT) {
+                // In some cases we have a large positive offset but are in repeat mode. What we need
+                // to do is tile, but we want to do so in such a way that we are "anchored" to the center,
+                // or right, or whatnot. That is what offsetX will be used for.
                 float offsetX = 0;
                 if (tileX != 0) {
                     float mod = tileX % tileWidth;
-                    tileX = mod == 0 ? 0 : mod - tileWidth;
+                    tileX = mod == 0 ? 0 : tileX < 0 ? mod : mod - tileWidth;
                     offsetX = tileX;
                 }
-                countX = (int) Math.max(1, Math.ceil((regionWidth + -offsetX) / tileWidth));
+                countX = (int) Math.max(1, Math.ceil((regionWidth - offsetX) / tileWidth));
                 xIncrement = horizontalSide == Side.RIGHT ? -tileWidth : tileWidth;
             } else if (repeatX == BackgroundRepeat.SPACE) {
                 tileX = 0; // Space will always start from the top left
@@ -1423,7 +1435,7 @@
                     tileY = mod == 0 ? 0 : mod - tileHeight;
                     offsetY = tileY;
                 }
-                countY = (int) Math.max(1, Math.ceil((regionHeight + -offsetY) / tileHeight));
+                countY = (int) Math.max(1, Math.ceil((regionHeight - offsetY) / tileHeight));
                 yIncrement = verticalSide == Side.BOTTOM ? -tileHeight : tileHeight;
             } else if (repeatY == BackgroundRepeat.SPACE) {
                 tileY = 0; // Space will always start from the top left
@@ -1456,19 +1468,19 @@
                     // We don't want to end up rendering if we find that the destination rect is completely
                     // off of the region rendering area
                     boolean skipRender = false;
-                    float dx1 = dstX < 0 ? 0 : dstX;
-                    float dy1 = dstY < 0 ? 0 : dstY;
+                    float dx1 = dstX < regionX ? regionX : dstX;
+                    float dy1 = dstY < regionY ? regionY : dstY;
                     if (dx1 > regionX2 || dy1 > regionY2) skipRender = true;
 
                     float dx2 = dstX2 > regionX2 ? regionX2 : dstX2;
                     float dy2 = dstY2 > regionY2 ? regionY2 : dstY2;
-                    if (dx2 < 0 || dy2 < 0) skipRender = true;
+                    if (dx2 < regionX || dy2 < regionY) skipRender = true;
 
                     if (!skipRender) {
                         // We know that dstX, dstY, dstX2, dstY2 overlap the region drawing area. Now we need
                         // to compute the source rectangle, and then draw.
-                        float sx1 = dstX < 0 ? srcX + srcW * (-dstX / tileWidth) : srcX;
-                        float sy1 = dstY < 0 ? srcY + srcH * (-dstY / tileHeight) : srcY;
+                        float sx1 = dstX < regionX ? srcX + srcW * ((regionX - dstX) / tileWidth) : srcX;
+                        float sy1 = dstY < regionY ? srcY + srcH * ((regionY - dstY) / tileHeight) : srcY;
                         float sx2 = dstX2 > regionX2 ? srcX2 - srcW * ((dstX2 - regionX2) / tileWidth) : srcX2;
                         float sy2 = dstY2 > regionY2 ? srcY2 - srcH * ((dstY2 - regionY2) / tileHeight) : srcY2;
                         g.drawTexture(texture, dx1, dy1, dx2, dy2, sx1, sy1, sx2, sy2);
