/** * Draws a tile with its top left corner at the given coordinates. The tile edges have white * stripes. * * <p>The colors of the resulting images depent on getWhiteLineColor() and getEmptySpaceColor(); */ public void drawStandardTileAbsolute(int x, int y) { // draw white square over the full distance drawSquare(img, x, y, sensors.getTileSize(), getWhiteLineColor()); drawSquare(img, x + 1, y + 1, sensors.getTileSize() - 2, getWhiteLineColor()); // draws an 'inner' lightBrown2 square. drawFilledSquare(img, x + 2, y + 2, sensors.getTileSize() - 4, getEmptySpaceColor()); }
/** * Draws a tile with its top left corner at the given coordinates. The tile has L shaped white * stripes, with the corner of the L to the bottom right. */ public void drawBottomRightLTileAbsolute(int x, int y) { drawVerticalLineWithFaders( img, x + (sensors.getTileSize() / 2) - 2, y, sensors.getTileSize() / 2 + 2); drawHorizontalLineWithFaders( img, x, y + (sensors.getTileSize() / 2) - 2, (sensors.getTileSize() / 2) + 1); // Correction drawLine( img, x + (sensors.getTileSize() / 2) - 1, y + (sensors.getTileSize() / 2) - 2, x + (sensors.getTileSize() / 2), y + (sensors.getTileSize() / 2) - 2, WHITE); }
/** * Draws a tile at the given coordinate in the system where each tile represents 1 unit on both x * and y axis. This tile has L shaped white stripes, with the corner of the L to the bottom left. */ public void drawBottomLeftLTile(int x, int y) { drawBottomLeftLTileAbsolute(x * sensors.getTileSize(), y * sensors.getTileSize()); }
/** * Draws a tile at the given coordinate in the system where each tile represents 1 unit on both x * and y axis. This tile has L shaped white stripes, with the corner of the L to the top right. */ public void drawTopRightLTile(int x, int y) { drawTopRightLTileAbsolute(x * sensors.getTileSize(), y * sensors.getTileSize()); }
/** * Draws a tile at the given coordinate in the system where each tile represents 1 unit on both x * and y axis. This tile has a white stripe horizontally crossing it. */ public void drawHorizontallyCrossedTile(int x, int y) { drawHorizontallyCrossedTileAbsolute(x * sensors.getTileSize(), y * sensors.getTileSize()); }
/** * Draws a standard tile at the given coordinate in the system where each tile represents 1 unit * on both x and y axis. This tile has white stripes at its borders. */ public void drawStandardTile(int x, int y) { drawStandardTileAbsolute(x * sensors.getTileSize(), y * sensors.getTileSize()); }
/** * Draws a tile with its top left corner at the given coordinates. The tile has a white stripe * horizontally crossing it. */ public void drawHorizontallyCrossedTileAbsolute(int x, int y) { drawHorizontalLineWithFaders( img, x, y + (sensors.getTileSize() / 2) - 2, sensors.getTileSize()); }
/** * Draws a tile with its top left corner at the given coordinates. The tile has a white stripe * vertically crossing it. */ public void drawVerticallyCrossedTileAbsolute(int x, int y) { drawVerticalLineWithFaders(img, x + (sensors.getTileSize() / 2) - 2, y, sensors.getTileSize()); }