Package org.spongepowered.api.map
Interface MapCanvas
- All Superinterfaces:
- DataSerializable
A 
MapCanvas represents the image that is drawn on a
 ItemTypes.FILLED_MAP.
 A canvas in vanilla Minecraft is 128x128 pixels.
- 
Nested Class SummaryNested Classes
- 
Method SummaryModifier and TypeMethodDescriptionstatic MapCanvasblank()Creates aMapCanvaswhere all pixels are set toMapColorTypes.NONE.static MapCanvas.Builderbuilder()Creates a builder for creating a newMapCanvas.color(int x, int y) Gets theMapColorat the given location.Creates aMapCanvas.Builderpopulated with the state of thisMapCanvas.toImage()Generates anImagefrom thisMapCanvas, where any pixels that representMapColorTypes.NONEwill be replaced with the suppliedColor.Methods inherited from interface org.spongepowered.api.data.persistence.DataSerializablecontentVersion, toContainer
- 
Method Details- 
builderCreates a builder for creating a newMapCanvas.- Returns:
- A MapCanvas.Builderto generate a new canvas.
 
- 
blankCreates aMapCanvaswhere all pixels are set toMapColorTypes.NONE.- Returns:
- A blank canvas
 
- 
colorGets theMapColorat the given location.- Parameters:
- x- The x location
- y- The y location
- Returns:
- The MapColorat the location
- Throws:
- IllegalArgumentException- if either of the requested co-ordinates are out of bounds.
 
- 
toImageImage toImage()- Returns:
- An Image
 
- 
toImageGenerates anImagefrom thisMapCanvas, where any pixels that representMapColorTypes.NONEwill be replaced with the suppliedColor.- Parameters:
- color- the- Colorused in place of- MapColorTypes.NONE
- Returns:
- An Image
 
- 
toBuilderMapCanvas.Builder toBuilder()Creates aMapCanvas.Builderpopulated with the state of thisMapCanvas.Changes to the returned builder will not affect this canvas. - Returns:
- A MapCanvas.Builder
 
 
-