public final class TilesExtractor extends Object
IGNORED_COLOR_VALUE
) is ignored (can be used to skip tile, in order to improve
performance).Modifier and Type | Class and Description |
---|---|
static interface |
TilesExtractor.Canceler
Cancel controller.
|
static interface |
TilesExtractor.ProgressListener
Listen to extraction progress.
|
Modifier and Type | Field and Description |
---|---|
static ColorRgba |
IGNORED_COLOR
Ignored color.
|
static int |
IGNORED_COLOR_VALUE
Ignored color.
|
Constructor and Description |
---|
TilesExtractor()
Create the extractor.
|
Modifier and Type | Method and Description |
---|---|
void |
addListener(TilesExtractor.ProgressListener listener)
Add a listener.
|
static boolean |
compareTile(int tw,
int th,
ImageBuffer a,
int xa,
int ya,
ImageBuffer b,
int xb,
int yb)
Compare two tiles by checking all pixels.
|
Collection<ImageBuffer> |
extract(int tw,
int th,
Media... levelRips)
Start using specified output file.
|
Collection<ImageBuffer> |
extract(TilesExtractor.Canceler canceler,
int tw,
int th,
Media... levelRips)
Start using specified output file.
|
public static final ColorRgba IGNORED_COLOR
public static final int IGNORED_COLOR_VALUE
public static boolean compareTile(int tw, int th, ImageBuffer a, int xa, int ya, ImageBuffer b, int xb, int yb)
tw
- The tile width.th
- The tile height.a
- The first tile image.xa
- The location x.ya
- The location y.b
- The second tile image.xb
- The location x.yb
- The location y.true
if equals, false
else.public void addListener(TilesExtractor.ProgressListener listener)
listener
- The listener to add.public Collection<ImageBuffer> extract(int tw, int th, Media... levelRips)
tw
- The tile width.th
- The tile height.levelRips
- The levels rip used.LionEngineException
- If an error occurred when computing sheet.public Collection<ImageBuffer> extract(TilesExtractor.Canceler canceler, int tw, int th, Media... levelRips)
canceler
- The canceler reference (can be null
).tw
- The tile width.th
- The tile height.levelRips
- The levels rip used.LionEngineException
- If an error occurred when computing sheet.Copyright © 2016 Byron 3D Games Studio. All rights reserved.