Examples of CustomBrush


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

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

      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

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

   * 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

Examples of tiled.mapeditor.brush.CustomBrush

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

Examples of tiled.mapeditor.brush.CustomBrush

                    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);
                }
            }
View Full Code Here

Examples of tiled.mapeditor.brush.CustomBrush

            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 layers = customBrush.getLayers();
                    while (layers.hasNext()) {
                        MapLayer layer = (MapLayer) layers.next();
                        layer.setOffset(brushRedraw.x, brushRedraw.y);
                    }
                }
View Full Code Here

Examples of tiled.mapeditor.brush.CustomBrush

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

Examples of tiled.mapeditor.brush.CustomBrush

        if (brushLayer.isEmpty()) {
          MessageDialog.openInformation(getSite().getShell(),
          Resources.getString("dialog.selection.empty"),
          Resources.getString("dialog.selection.empty"));
        } else {
          setBrush(new CustomBrush(brushLayer));
          cursorHighlight.setOffset(tile.x - (int) bounds.width / 2,
              tile.y - (int) bounds.height / 2);
        }
      } else if (mouseButton == 1 && layer instanceof ObjectGroup) {
        // TODO: Fix this to use pixels in the first place
View Full Code Here

Examples of tiled.mapeditor.brush.CustomBrush

      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

Examples of tiled.mapeditor.brush.CustomBrush

        }
  }
 
  public void paste() {
    if (clipboardLayer instanceof TileLayer) {
      setBrush(new CustomBrush((TileLayer)clipboardLayer));
      setCurrentPointerState(PS_PAINT);
    } else if (clipboardLayer instanceof ObjectSelectionLayer && getCurrentLayer() instanceof ObjectGroup) {
      Display display = Display.getDefault();
      Point cursorLocation = null;
      if (display.getCursorControl() == mapView) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.