Examples of ShapeBrush


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

  public void resetBrush() {
    // FIXME: this is an in-elegant hack, but it gets the user out
    // of custom brush mode
    // (reset the brush if necessary)
    if (currentBrush instanceof CustomBrush) {
      ShapeBrush sb = new ShapeBrush();
      sb.makeQuadBrush(new Rectangle(0, 0, 1, 1));
      sb.setTile(currentTile);
      setBrush(sb);
    }
  }
View Full Code Here

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

    currentMap = newMap;
    boolean mapLoaded = currentMap != null;

    // Create a default brush (protect against a bug with custom brushes)
    ShapeBrush sb = new ShapeBrush();
    sb.makeQuadBrush(new Rectangle(0, 0, 1, 1));
    setBrush(sb);

    tabbedTilesetsPane.setMap(currentMap);

    if (!mapLoaded) {
View Full Code Here

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

  private void initPresets() {
    int[] dimensions = { 1, 2, 4, 8, 12, 20 };

    for (int n = 1; n < dimensions.length; n++) {
      ShapeBrush brush = new ShapeBrush();
      brush.makeCircleBrush(dimensions[n] / 2);
      brushes.add(brush);
    }

    for (int dimension : dimensions) {
      ShapeBrush brush = new ShapeBrush();
      brush.makeQuadBrush(new Rectangle(0, 0, dimension, dimension));
      brushes.add(brush);
    }
  }
View Full Code Here

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

    if (myBrush instanceof ShapeBrush) {
      t = ((ShapeBrush) myBrush).getTile();
    }

    ShapeBrush sel = (ShapeBrush) brushes.getSelectedBrush();
    sel.setSize((Integer) brushSize.getValue());

    if (cbRandomBrush.isSelected()) {
      RandomBrush randomBrush = new RandomBrush(sel);
      randomBrush.setRatio(sRandomAmount.getValue() / (double) sRandomAmount.getMaximum());
      myBrush = randomBrush;
    } else {
      myBrush = new ShapeBrush(sel);
    }

    ((ShapeBrush) myBrush).setTile(t);
    myBrush.setAffectedLayers((Integer) affectLayers.getValue());
View Full Code Here

Examples of tiled.mapeditor.brush.ShapeBrush

    private void initPresets() {
        int[] dimensions = { 1, 2, 4, 8, 12, 20 };

        for (int n = 1; n < dimensions.length; n++) {
            ShapeBrush brush = new ShapeBrush();
            brush.makeCircleBrush(dimensions[n] / 2);
            brushes.add(brush);
        }

        for (int n = 0; n < dimensions.length; n++) {
            ShapeBrush brush = new ShapeBrush();
            brush.makeQuadBrush(new Rectangle(0, 0, dimensions[n], dimensions[n]));
            brushes.add(brush);
        }
    }
View Full Code Here

Examples of tiled.mapeditor.brush.ShapeBrush

    public void resetBrush() {
        //FIXME: this is an in-elegant hack, but it gets the user out
        //       of custom brush mode
        //(reset the brush if necessary)
        if (currentBrush instanceof CustomBrush) {
            ShapeBrush sb = new ShapeBrush();
            sb.makeQuadBrush(new Rectangle(0, 0, 1, 1));
            sb.setTile(currentTile);
            setBrush(sb);
        }
    }
View Full Code Here

Examples of tiled.mapeditor.brush.ShapeBrush

      if(currentMap == newMap) return;
        currentMap = newMap;
        boolean mapLoaded = currentMap != null;

        // Create a default brush (protect against a bug with custom brushes)
        ShapeBrush sb = new ShapeBrush();
        sb.makeQuadBrush(new Rectangle(0, 0, 1, 1));
        setBrush(sb);

        tabbedTilesetsPane.setMap(currentMap);

        if (!mapLoaded) {
View Full Code Here

Examples of tiled.mapeditor.brush.ShapeBrush

    cursorHighlight = new SelectionLayer(1, 1);
    cursorHighlight.select(0, 0);
    cursorHighlight.setVisible(prefs.getBoolean("cursorhighlight", true));

    ShapeBrush sb = new ShapeBrush();
    sb.makeQuadBrush(new Rectangle(0, 0, 1, 1));
    setBrush(sb);
    setCurrentMap(currentMap);
    init = false;
   
    Display.getDefault().asyncExec(new Runnable() {
View Full Code Here

Examples of tiled.mapeditor.brush.ShapeBrush

  public void resetBrush() {
    // FIXME: this is an in-elegant hack, but it gets the user out
    // of custom brush mode
    // (reset the brush if necessary)
    if (currentBrush instanceof CustomBrush) {
      ShapeBrush sb = new ShapeBrush();
      sb.makeQuadBrush(new Rectangle(0, 0, 1, 1));
      sb.setTile(currentTile);
      setBrush(sb);
    }
  }
View Full Code Here

Examples of tiled.mapeditor.brush.ShapeBrush

    currentMap = newMap;
//    boolean mapLoaded = currentMap != null;

    // Create a default brush (protect against a bug with custom brushes)
    ShapeBrush sb = new ShapeBrush();
    sb.makeQuadBrush(new Rectangle(0, 0, 1, 1));
    setBrush(sb);

    // Get the first non-null tile from the first tileset containing
    // non-null tiles.
    Vector<TileSet> tilesets = currentMap.getTilesets();
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.