Package tiled.core

Examples of tiled.core.TileLayer.copyFrom()


      // STAMP
      if (mouseButton == 3 && layer instanceof TileLayer) {
        // Right mouse button dragged: create and set custom brush
        TileLayer brushLayer = new TileLayer(bounds);
        brushLayer.copyFrom(getCurrentLayer());
        brushLayer.setOffset(tile.x - (int) bounds.width / 2, tile.y
            - (int) bounds.height / 2);

        // Do a quick check to make sure the selection is not empty
        if (brushLayer.isEmpty()) {
View Full Code Here


    }

    Rectangle bounds = new Rectangle(area.x, area.y, area.width + 1,
        area.height + 1);
    after = new TileLayer(bounds);
    after.copyFrom(layer);

     MapLayerEdit mle = new MapLayerEdit(layer, before, after);
     mle.setPresentationName(TOOL_FILL);
     addEdit(mle);
  }
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.