Class ForegroundTransferSource.Builder
java.lang.Object
dev.lukebemish.dynamicassetgenerator.api.client.generators.texsources.ForegroundTransferSource.Builder
- Enclosing class:
ForegroundTransferSource
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()setBackground(TexSource background) Sets the background texture.setCloseCutoff(double closeCutoff) Sets how close a pixel has to be to the backgorund palette to be considered as potentially not a full-opacity foreground pixel.setExtendPaletteSize(int extendPaletteSize) Sets the minimum size of the palette.setFillHoles(boolean fillHoles) Sets whether small holes in the foreground should be filled in.setForceNeighbors(boolean forceNeighbors) Sets whether the shading of pixels next to foreground pixels should be kept regardless of whether it changes between the background and full images.Sets the input texture, which contains the desired foreground overlayed over a background with the same palette as the image provided withsetBackground(dev.lukebemish.dynamicassetgenerator.api.client.generators.TexSource).setNewBackground(TexSource newBackground) Sets the new background texture which the foreground, including surrounding shading, will be moved onto.setTrimTrailing(boolean trimTrailing) Sets whether shading pixels that are not connected to the foreground should be trimmed.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
setBackground
Sets the background texture. This texture is used to determine which pixels are background and which are foreground. -
setFull
Sets the input texture, which contains the desired foreground overlayed over a background with the same palette as the image provided withsetBackground(dev.lukebemish.dynamicassetgenerator.api.client.generators.TexSource). -
setNewBackground
Sets the new background texture which the foreground, including surrounding shading, will be moved onto. -
setExtendPaletteSize
Sets the minimum size of the palette. If the palette is smaller than this size, it will be extended to this. Defaults to 8. -
setTrimTrailing
Sets whether shading pixels that are not connected to the foreground should be trimmed. Defaults to true. -
setForceNeighbors
Sets whether the shading of pixels next to foreground pixels should be kept regardless of whether it changes between the background and full images. Defaults to true. -
setFillHoles
Sets whether small holes in the foreground should be filled in. Defaults to true. -
setCloseCutoff
Sets how close a pixel has to be to the backgorund palette to be considered as potentially not a full-opacity foreground pixel. Defaults to 2. -
build
-