Java源码示例:org.newdawn.slick.opengl.ImageData

示例1
/**
 * Create an image from a image data source. Note that this method uses 
 * 
 * @param data The pixelData to use to create the image
 * @param f The filter to use when scaling this image
 */
public Image(ImageData data, int f) {
	try {
		this.filter = f == FILTER_LINEAR ? SGL.GL_LINEAR : SGL.GL_NEAREST;
		texture = InternalTextureLoader.get().getTexture(data, this.filter);
		ref = texture.toString();
	} catch (IOException e) {
		Log.error(e);
	}
}
 
示例2
/**
 * Create an image from a image data source. Note that this method uses 
 * 
 * @param data The pixelData to use to create the image
 * @param f The filter to use when scaling this image
 */
public Image(ImageData data, int f) {
	try {
		this.filter = f == FILTER_LINEAR ? SGL.GL_LINEAR : SGL.GL_NEAREST;
		texture = InternalTextureLoader.get().getTexture(data, this.filter);
		ref = texture.toString();
	} catch (IOException e) {
		Log.error(e);
	}
}
 
示例3
/**
    * @see org.newdawn.slick.GameContainer#setMouseCursor(org.newdawn.slick.opengl.ImageData, int, int)
    */
   public void setMouseCursor(ImageData data, int hotSpotX, int hotSpotY) throws SlickException {
      try {
         Cursor cursor = CursorLoader.get().getCursor(data, hotSpotX, hotSpotY);
         Mouse.setNativeCursor(cursor);
      } catch (Throwable e) {
         Log.error("Failed to load and apply cursor.", e);
throw new SlickException("Failed to set mouse cursor", e);
      }
   }
 
示例4
/**
 * @see org.newdawn.slick.GameContainer#setMouseCursor(org.newdawn.slick.opengl.ImageData, int, int)
 */
public void setMouseCursor(ImageData data, int hotSpotX, int hotSpotY) throws SlickException {
	try {
		Cursor cursor = CursorLoader.get().getCursor(data, hotSpotX, hotSpotY);
		Mouse.setNativeCursor(cursor);
	} catch (Throwable e) {
		Log.error("Failed to load and apply cursor.", e);
		throw new SlickException("Failed to set mouse cursor", e);
	}
}
 
示例5
/**
 * Create an image from a image data source. Note that this method uses 
 * 
 * @param data The pixelData to use to create the image
 * @param f The filter to use when scaling this image
 */
public Image(ImageData data, int f) {
	try {
		this.filter = f == FILTER_LINEAR ? SGL.GL_LINEAR : SGL.GL_NEAREST;
		texture = InternalTextureLoader.get().getTexture(data, this.filter);
		ref = texture.toString();
	} catch (IOException e) {
		Log.error(e);
	}
}
 
示例6
/**
 * Create an image from a pixelData of pixels
 * 
 * @param buffer The pixelData to use to create the image
 * @param filter The filter to use when scaling this image
 */
Image(ImageBuffer buffer, int filter) {
	this((ImageData) buffer, filter);
       TextureImpl.bindNone();
}
 
示例7
/**
 * Create an image from a image data source
 * 
 * @param data The pixelData to use to create the image
 */
public Image(ImageData data) {
	this(data, FILTER_LINEAR);
}
 
示例8
/**
 * Constructor.
 * @param imageData the class holding the image properties
 * @param buffer the stored image
 */
public LoadedImageData(ImageData imageData, ByteBuffer buffer) {
	this.imageData = imageData;
	this.buffer = buffer;
}
 
示例9
/**
 * Set the mouse cursor to be displayed - this is a hardware cursor and hence
 * shouldn't have any impact on FPS.
 * 
 * @param data The image data from which the cursor can be construted
 * @param hotSpotX The x coordinate of the hotspot within the cursor image
 * @param hotSpotY The y coordinate of the hotspot within the cursor image
 * @throws SlickException Indicates a failure to load the cursor image or create the hardware cursor
 */
@Override
public abstract void setMouseCursor(ImageData data, int hotSpotX, int hotSpotY) throws SlickException;
 
示例10
/**
 * Create an image from a pixelData of pixels
 * 
 * @param buffer The pixelData to use to create the image
 * @param filter The filter to use when scaling this image
 */
Image(ImageBuffer buffer, int filter) {
	this((ImageData) buffer, filter);
       TextureImpl.bindNone();
}
 
示例11
/**
 * Create an image from a image data source
 * 
 * @param data The pixelData to use to create the image
 */
public Image(ImageData data) {
	this(data, FILTER_LINEAR);
}
 
示例12
/**
 * Constructor.
 * @param imageData the class holding the image properties
 * @param buffer the stored image
 */
public LoadedImageData(ImageData imageData, ByteBuffer buffer) {
	this.imageData = imageData;
	this.buffer = buffer;
}
 
示例13
/**
 * Set the mouse cursor to be displayed - this is a hardware cursor and hence
 * shouldn't have any impact on FPS.
 * 
 * @param data The image data from which the cursor can be construted
 * @param hotSpotX The x coordinate of the hotspot within the cursor image
 * @param hotSpotY The y coordinate of the hotspot within the cursor image
 * @throws SlickException Indicates a failure to load the cursor image or create the hardware cursor
 */
public abstract void setMouseCursor(ImageData data, int hotSpotX, int hotSpotY) throws SlickException;
 
示例14
/**
 * Create an image from a pixelData of pixels
 * 
 * @param buffer The pixelData to use to create the image
 * @param filter The filter to use when scaling this image
 */
Image(ImageBuffer buffer, int filter) {
	this((ImageData) buffer, filter);
       TextureImpl.bindNone();
}
 
示例15
/**
 * Create an image from a image data source
 * 
 * @param data The pixelData to use to create the image
 */
public Image(ImageData data) {
	this(data, FILTER_LINEAR);
}
 
示例16
/**
 * Set the mouse cursor to be displayed - this is a hardware cursor and hence
 * shouldn't have any impact on FPS.
 * 
 * @param data The image data from which the cursor can be construted
 * @param hotSpotX The x coordinate of the hotspot within the cursor image
 * @param hotSpotY The y coordinate of the hotspot within the cursor image
 * @throws SlickException Indicates a failure to load the cursor image or create the hardware cursor
 */
public abstract void setMouseCursor(ImageData data, int hotSpotX, int hotSpotY) throws SlickException;