| Package | Description |
|---|---|
| com.almasb.fxgl.service | |
| com.almasb.fxgl.texture |
| Modifier and Type | Method and Description |
|---|---|
Texture |
AssetLoader.loadTexture(String name)
Loads texture with given name from /assets/textures/.
|
Texture |
AssetLoader.loadTexture(String name,
double width,
double height)
Loads texture with given name from /assets/textures/.
|
| Modifier and Type | Method and Description |
|---|---|
Texture |
Texture.copy()
Call this to create a new texture if you are
planning to use the same image as graphics
for multiple entities.
|
Texture |
Texture.discolor()
Discoloring is done via setting each pixel to white but
preserving opacity (alpha channel).
|
Texture |
Texture.multiplyColor(javafx.scene.paint.Color color)
Multiplies this texture's pixel color with given color.
|
Texture |
Texture.subTexture(javafx.geometry.Rectangle2D area)
Given a rectangular area, produces a sub-texture of
this texture.
|
Texture |
Texture.superTexture(Texture other,
javafx.geometry.HorizontalDirection direction)
Generates a new texture which combines this and given texture.
|
Texture |
Texture.superTexture(Texture other,
javafx.geometry.VerticalDirection direction)
Generates a new texture which combines this and given texture.
|
Texture |
Texture.toColor(javafx.scene.paint.Color color)
Colorizes this texture's pixels with given color.
|
Texture |
Texture.toGrayscale() |
| Modifier and Type | Method and Description |
|---|---|
void |
Texture.set(Texture other)
Set texture data by copying it from other texture.
|
Texture |
Texture.superTexture(Texture other,
javafx.geometry.HorizontalDirection direction)
Generates a new texture which combines this and given texture.
|
Texture |
Texture.superTexture(Texture other,
javafx.geometry.VerticalDirection direction)
Generates a new texture which combines this and given texture.
|
Copyright © 2017. All rights reserved.