Package org.spongepowered.api.map
Interface MapCanvas.Builder
- 
- All Superinterfaces:
- ResettableBuilder<MapCanvas,MapCanvas.Builder>
 - Enclosing interface:
- MapCanvas
 
 public static interface MapCanvas.Builder extends ResettableBuilder<MapCanvas,MapCanvas.Builder> A builder that creates aMapCanvas.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description MapCanvasbuild()Creates aMapCanvasfrom the state of this builder.MapCanvas.Builderfrom(MapCanvas canvas)MapCanvas.BuilderfromContainer(DataView container)Attempts to reconstruct the builder with all of the data fromDataSerializable.toContainer().MapCanvas.BuilderfromImage(java.awt.Image image)Fills a canvas from an image This given image will be copied and thus changes to the image after this is called will not be reflected.MapCanvas.Builderpaint(int startX, int startY, int endX, int endY, MapColor mapColor)Sets the rectangle bounded by the given co-ordinates to the suppliedMapColor.default MapCanvas.Builderpaint(Vector2i start, Vector2i end, MapColor mapColor)Sets the rectangle bounded by the given co-ordinates to the suppliedMapColor.MapCanvas.BuilderpaintAll(MapColor color)Sets the entire canvas to the suppliedMapColor.- 
Methods inherited from interface org.spongepowered.api.util.ResettableBuilderreset
 
- 
 
- 
- 
- 
Method Detail- 
paintAllMapCanvas.Builder paintAll(MapColor color) Sets the entire canvas to the suppliedMapColor.- Parameters:
- color- The- MapColor
- Returns:
- this builder, for chaining
 
 - 
paintMapCanvas.Builder paint(int startX, int startY, int endX, int endY, MapColor mapColor) Sets the rectangle bounded by the given co-ordinates to the suppliedMapColor.The provided co-ordinates are included in the region. - Parameters:
- startX- Bottom left corner of region to paint
- startY- Bottom left corner of region to paint
- endX- Top right corner of region to paint
- endY- Top right corner of region to paint
- mapColor- The- MapColorto paint the given region
- Returns:
- this builder, for chaining
 
 - 
paintdefault MapCanvas.Builder paint(Vector2i start, Vector2i end, MapColor mapColor) Sets the rectangle bounded by the given co-ordinates to the suppliedMapColor.The provided co-ordinates are included in the region. 
 - 
fromMapCanvas.Builder from(MapCanvas canvas) - Parameters:
- canvas-- MapCanvasto set the state of this builder to
- Returns:
- this builder, for chaining
 
 - 
fromImageMapCanvas.Builder fromImage(java.awt.Image image) throws java.lang.IllegalArgumentException Fills a canvas from an image This given image will be copied and thus changes to the image after this is called will not be reflected.- Parameters:
- image- to take from
- Returns:
- This Builder, for chaining
- Throws:
- java.lang.IllegalArgumentException- if width/height is wrong or not known yet
- java.lang.IllegalArgumentException- if color found is not in the palette- MapColorTypes
 
 - 
fromContainerMapCanvas.Builder fromContainer(DataView container) Attempts to reconstruct the builder with all of the data fromDataSerializable.toContainer().- Parameters:
- container- The container to translate
- Returns:
- This builder, for chaining
 
 
- 
 
-