/** * Returns the horizontal index of the rightmost column of tiles. * getMaxTileX() is implemented in terms of getMaxX() * and so does not need to be implemented by subclasses. */ public int getMaxTileX() { return XToTileX(getMaxX() - 1); }
/** * Returns the horizontal index of the leftmost column of tiles. * getMinTileX() is implemented in terms of getMinX() * and so does not need to be implemented by subclasses. */ public int getMinTileX() { return XToTileX(getMinX()); }
/** * Returns the horizontal index of the leftmost column of tiles. * getMinTileX() is implemented in terms of getMinX() * and so does not need to be implemented by subclasses. */ public int getMinTileX() { return XToTileX(getMinX()); }
/** * Returns the horizontal index of the rightmost column of tiles. * getMaxTileX() is implemented in terms of getMaxX() * and so does not need to be implemented by subclasses. */ public int getMaxTileX() { return XToTileX(getMaxX() - 1); }
/** * Returns the horizontal index of the leftmost column of tiles. * getMinTileX() is implemented in terms of getMinX() * and so does not need to be implemented by subclasses. */ public int getMinTileX() { return XToTileX(getMinX()); }
/** * Returns the horizontal index of the rightmost column of tiles. * getMaxTileX() is implemented in terms of getMaxX() * and so does not need to be implemented by subclasses. */ public int getMaxTileX() { return XToTileX(getMaxX() - 1); }
/** * Converts a pixel's X coordinate into a horizontal tile index. * This is a convenience method. No attempt is made to detect * out-of-range coordinates. * * @param x the X coordinate of a pixel. * @return the X index of the tile containing the pixel. */ public int XToTileX(int x) { return XToTileX(x, getTileGridXOffset(), getTileWidth()); }
/** * Converts a pixel's X coordinate into a horizontal tile index. * This is a convenience method. No attempt is made to detect * out-of-range coordinates. * * @param x the X coordinate of a pixel. * @return the X index of the tile containing the pixel. */ public int XToTileX(int x) { return XToTileX(x, getTileGridXOffset(), getTileWidth()); }
/** * Converts a pixel's X coordinate into a horizontal tile index. * This is a convenience method. No attempt is made to detect * out-of-range coordinates. * * @param x the X coordinate of a pixel. * @return the X index of the tile containing the pixel. */ public int XToTileX(int x) { return XToTileX(x, getTileGridXOffset(), getTileWidth()); }
int startX = XToTileX(bounds.x); int startY = YToTileY(bounds.y); int endX = XToTileX(bounds.x + bounds.width - 1); int endY = YToTileY(bounds.y + bounds.height - 1); startX = XToTileX(xsect.x); startY = YToTileY(xsect.y); endX = XToTileX(xsect.x + xsect.width - 1); endY = YToTileY(xsect.y + xsect.height - 1);
int startX = XToTileX(bounds.x); int startY = YToTileY(bounds.y); int endX = XToTileX(bounds.x + bounds.width - 1); int endY = YToTileY(bounds.y + bounds.height - 1); startX = XToTileX(xsect.x); startY = YToTileY(xsect.y); endX = XToTileX(xsect.x + xsect.width - 1); endY = YToTileY(xsect.y + xsect.height - 1);
int startX = XToTileX(bounds.x); int startY = YToTileY(bounds.y); int endX = XToTileX(bounds.x + bounds.width - 1); int endY = YToTileY(bounds.y + bounds.height - 1); startX = XToTileX(xsect.x); startY = YToTileY(xsect.y); endX = XToTileX(xsect.x + xsect.width - 1); endY = YToTileY(xsect.y + xsect.height - 1);