Basics
Guides
API Reference
Basics
Guides
API Reference
[21:7] extends: ImageView
Wraps FXGL's Texture, an ImageView subclass that adds common image-processing operations (subTexture, super-tile composition, grayscale, invert, brighter / darker, transparentColor, blend, outline). Aussom users typically obtain a Texture via fxgl.getAssetLoader().loadTexture(name) in chunk 6; this wrapper exposes direct construction from a JavaFX Image plus the most-used transforms. Because Texture extends ImageView, every wrapper here can be added to a scene through the existing fx.ImageView pattern (via .obj on a compatible Aussom wrapper).
Texture (ImageObj = null)
Creates a new Texture from a JavaFX Image. Pass null (or nothing) to construct an empty wrapper for adopt to populate; the underlying FXGL Texture constructor requires a non-null Image, so it is only invoked when ImageObj is supplied.
ImageObj is an Image wrapper (fx.Image), or null.adopt (object Ajo)
Wraps an existing Texture AussomJavaObject.
Ajo is an AussomJavaObject around a Texture.A new Texture wrapper.getWidth ()
Returns the width of the underlying image.
A double with the width.getHeight ()
Returns the height of the underlying image.
A double with the height.subTexture (double X, double Y, double W, double H)
Returns a Texture restricted to the given rectangular region of the source image.
X is the region X origin.Y is the region Y origin.W is the region width.H is the region height.A new Texture wrapper.toGrayscale ()
Returns a grayscale copy of this texture.
A new Texture wrapper.brighter ()
Returns a brighter copy of this texture.
A new Texture wrapper.darker ()
Returns a darker copy of this texture.
A new Texture wrapper.replaceColor (object OldColor, object NewColor)
Returns a copy of this texture with one color replaced by another.
OldColor is a Color wrapper for the color to replace.NewColor is a Color wrapper for the replacement.A new Texture wrapper.transparentColor (object ColorObj)
Returns a copy of this texture with the given color replaced by transparent pixels.
ColorObj is a Color wrapper.A new Texture wrapper.toAnimatedTexture (int Frames, double DurationSeconds)
Builds an AnimatedTexture from a sprite-sheet source image by splitting the image horizontally into the requested number of frames and playing each frame for an equal slice of the given duration. The returned wrapper is a Texture (AnimatedTexture extends Texture), so it can be added to a scene the usual way; reach AnimatedTexture-specific methods (play, loop, stop) through its .obj.
Frames is the number of horizontal cells in the sheet.DurationSeconds is the total play duration in seconds.A Texture wrapper around an AnimatedTexture.toAnimatedTextureChannel (object ChannelObj)
Builds an AnimatedTexture from a pre-built AnimationChannel and returns it as a plain Texture wrapper (AnimatedTexture extends Texture). See toAnimatedTexture for the playback-API access pattern.
ChannelObj is an AnimationChannel wrapper.A Texture wrapper around an AnimatedTexture.multiplyColor (object ColorObj)
Returns a copy of this texture with each pixel's color multiplied (channel-wise) by the given Color.
ColorObj is a Color wrapper.A new Texture wrapper.toColor (object ColorObj)
Returns a copy of this texture recolored so every non- transparent pixel uses the given Color (preserving alpha).
ColorObj is a Color wrapper.A new Texture wrapper.outline (object ColorObj, int Offset = 1)
Returns a copy of this texture surrounded by a one- or multi-pixel outline of the given Color.
ColorObj is a Color wrapper.Offset is the outline width in pixels (default 1).A new Texture wrapper.discolor ()
Returns a discolored copy (every pixel becomes white with its original alpha). Useful for tinting effects.
A new Texture wrapper.toBlackWhite ()
Returns a high-contrast black-and-white copy.
A new Texture wrapper.invert ()
Returns an inverted-color copy.
A new Texture wrapper.saturate ()
Returns a more saturated copy.
A new Texture wrapper.desaturate ()
Returns a less saturated copy.
A new Texture wrapper.copy ()
Returns a copy of this texture. Useful when the same image needs to appear in two scene locations; a JavaFX Node can only have one parent at a time.
A new Texture wrapper.set (object Other)
Replaces this texture's image with another texture's image in place.
Other is a Texture wrapper.this objectdispose ()
Releases the texture's image data. Use when many textures have been created at runtime and no longer need to stay in memory.
this objectpixels ()
Returns a flat list of Pixel objects describing each pixel in the underlying image.
An AussomJavaObject around a ListsuperTexture (object Other, string DirectionName)
Returns a new texture made by concatenating Other onto this texture in the given horizontal or vertical direction.
Other is a Texture wrapper.DirectionName is "RIGHT" / "LEFT" / "UP" / "DOWN". Horizontal directions ("RIGHT", "LEFT") map to javafx.geometry.HorizontalDirection; vertical to VerticalDirection.A new Texture wrapper.blend (object BackgroundObj, string BlendModeName)
Returns a new texture made by blending this texture over the given background using the supplied BlendMode.
BackgroundObj is a Texture wrapper (or AussomJavaObject around a JavaFX Image).BlendModeName is the BlendMode enum name (e.g. "ADD", "MULTIPLY", "SCREEN").A new Texture wrapper.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.