public interface SpriteProvider
This interface represents a type of object which provides sprite generation capabilities.
When a set of images is aggregated, then the region of each of them in the
generated image is located through a sprite. A sprite could be generated
according to specific convention in a chosen language. The implementation
of this interface must be able to specify the language through a known
NutType.
| Modifier and Type | Method and Description |
|---|---|
void |
addRegion(Region region,
String name)
Registers a new region in the image.
|
ConvertibleNut |
getSprite(String workflowId,
UrlProvider urlProvider,
String nutNamePrefix,
List<ConvertibleNut> originals)
|
void |
init(ConvertibleNut nut)
Initializes this provider with a new image.
|
void addRegion(Region region, String name)
Registers a new region in the image.
region - the regionname - the region nameConvertibleNut getSprite(String workflowId, UrlProvider urlProvider, String nutNamePrefix, List<ConvertibleNut> originals) throws IOException
Get the sprite of all the added images in a map associating
a NutType as key a Nut as value.
Each sprite is in a path associated to a supported
NutType which helps
to determinate the language used to represent them.
workflowId - the workflow IDurlProvider - the UrlProvidernutNamePrefix - the prefix to append to the sprite nut nameoriginals - the original nutsIOException - if an I/O error occurs while aggregating imagesvoid init(ConvertibleNut nut)
Initializes this provider with a new image. Previous regions will be cleared.
nut - the new imageCopyright © 2012-2015. All Rights Reserved.