Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
epoxy
GitHub Repository: epoxy/proj11
Path: blob/master/SLICK_HOME/src/org/newdawn/slick/opengl/LoadableImageData.java
1461 views
1
package org.newdawn.slick.opengl;
2
3
import java.io.IOException;
4
import java.io.InputStream;
5
import java.nio.ByteBuffer;
6
7
/**
8
* An image data source that can load images from a stream
9
*
10
* @author kevin
11
*/
12
public interface LoadableImageData extends ImageData {
13
/**
14
* Configure the edging that can be used to make texture edges
15
* loop more cleanly
16
*
17
* @param edging True if we should edge
18
*/
19
public void configureEdging(boolean edging);
20
21
/**
22
* Load a image from the specified stream
23
*
24
* @param fis The stream from which we'll load the TGA
25
* @throws IOException Indicates a failure to read the TGA
26
* @return The byte buffer containing texture data
27
*/
28
public ByteBuffer loadImage(InputStream fis) throws IOException;
29
30
/**
31
* Load a image from the specified stream
32
*
33
* @param fis The stream from which we'll load the TGA
34
* @param flipped True if we loading in flipped mode (used for cursors)
35
* @param transparent The colour to interpret as transparent or null if none
36
* @return The byte buffer containing texture data
37
* @throws IOException Indicates a failure to read the TGA
38
*/
39
public ByteBuffer loadImage(InputStream fis, boolean flipped, int[] transparent)
40
throws IOException;
41
42
/**
43
* Load a image from the specified stream
44
*
45
* @param fis The stream from which we'll load the TGA
46
* @param flipped True if we loading in flipped mode (used for cursors)
47
* @param forceAlpha Force the output to have an alpha channel
48
* @param transparent The colour to interpret as transparent or null if none
49
* @return The byte buffer containing texture data
50
* @throws IOException Indicates a failure to read the TGA
51
*/
52
public ByteBuffer loadImage(InputStream fis, boolean flipped, boolean forceAlpha, int[] transparent)
53
throws IOException;
54
}
55
56