Package de.yaams.extensions.basemap.tiled.mapeditor.brush

Examples of de.yaams.extensions.basemap.tiled.mapeditor.brush.CustomBrush


        // Do a quick check to make sure the selection is not empty
        if (brushLayer.isEmpty()) {
          JOptionPane.showMessageDialog(appFrame, Resources.getString("dialog.selection.empty"),
              Resources.getString("dialog.selection.empty"), JOptionPane.WARNING_MESSAGE);
        } else {
          setBrush(new CustomBrush(brushLayer));
          cursorHighlight.setOffset(tile.x - (int) bounds.getWidth() / 2, tile.y - (int) bounds.getHeight() / 2);
        }
      } else if (mouseButton == MouseEvent.BUTTON1 && layer instanceof ObjectGroup) {
        // TODO: Fix this to use pixels in the first place
        // (with optional snap to grid)
View Full Code Here


      brushRedraw.x = tile.x - brushRedraw.width / 2;
      brushRedraw.y = tile.y - brushRedraw.height / 2;

      if (!redraw.equals(brushRedraw)) {
        if (currentBrush instanceof CustomBrush) {
          CustomBrush customBrush = (CustomBrush) currentBrush;
          ListIterator<MapLayer> layers = customBrush.getLayers();
          while (layers.hasNext()) {
            MapLayer layer = layers.next();
            layer.setOffset(brushRedraw.x, brushRedraw.y);
          }
        }
View Full Code Here

   * Creates a stamp brush from the region contents and sets this as the
   * current brush.
   */
  @Override
  public void tileRegionSelected(TileRegionSelectionEvent e) {
    mapEditor.setBrush(new CustomBrush(e.getTileRegion()));
  }
View Full Code Here

TOP

Related Classes of de.yaams.extensions.basemap.tiled.mapeditor.brush.CustomBrush

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.