|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.gnu.glib.Struct
org.gnu.glib.GObject
org.gnu.gdk.Pixbuf
org.gnome.gdk.Pixbuf
.
public class Pixbuf
This class describes an image in memory.
Image data in a pixbuf is stored in memory in uncompressed, packed format. Rows in the image are stored top to bottom, and in each row pixels are stored from left to right. There may be padding at the end of a row. The "rowstride" value of a pixbuf, as returned by getRowstride(), indicates the number of bytes between rows.
Constructor Summary | |
---|---|
Pixbuf(byte[] data)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
|
Pixbuf(byte[] data,
boolean copyPixels)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
|
Pixbuf(Colorspace colorSpace,
boolean hasAlpha,
int bitsPerSample,
int width,
int height)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
|
Pixbuf(Drawable drawable,
Colormap colormap,
int srcX,
int srcY,
int destX,
int destY,
int width,
int height)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
|
Pixbuf(org.gnu.glib.Handle handle)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
|
Pixbuf(Image image,
Colormap colormap,
int srcX,
int srcY,
int destX,
int destY,
int width,
int height)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
|
Pixbuf(Pixbuf srcPixbuf,
int srcX,
int srcY,
int width,
int height)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
|
Pixbuf(java.lang.String filename)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
|
Pixbuf(java.lang.String filename,
int width,
int height,
boolean preserveAspect)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Method Summary | |
---|---|
Pixbuf |
addAlpha(boolean substituteColor,
int red,
int green,
int blue)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Pixbuf |
composite(int width,
int height,
InterpType type,
int overallAlpha,
int checkSize,
int color1,
int color2)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Pixbuf |
composite(Pixbuf dest,
int destX,
int destY,
int destWidth,
int destHeight,
double offsetX,
double offsetY,
double scaleX,
double scaleY,
InterpType type,
int overallAlpha)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Pixbuf |
composite(Pixbuf dest,
int destX,
int destY,
int destWidth,
int destHeight,
double offsetX,
double offsetY,
double scaleX,
double scaleY,
InterpType type,
int overallAlpha,
int checkX,
int checkY,
int checkSize,
int color1,
int color2)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Pixbuf |
copy()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
copyArea(int x,
int y,
int width,
int height,
Pixbuf dest,
int destX,
int destY)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
fill(int pixel)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Pixbuf |
flip(boolean horizontal)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
int |
getBitsPerSample()
Deprecated. |
Colorspace |
getColorspace()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
static PixbufFormat |
getFileInformation(java.lang.String filename)
Deprecated. |
int |
getNumChannels()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
java.lang.String |
getOption(java.lang.String key)
Deprecated. |
static Pixbuf |
getPixbufFromHandle(org.gnu.glib.Handle hndl)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
byte[] |
getPixels()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
int |
getRowstride()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
static org.gnu.glib.Type |
getType()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
boolean |
hasAlpha()
Deprecated. |
int |
height()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Pixbuf |
rotate(PixbufRotation direction)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Pixbuf |
saturateAndPixelate(Pixbuf dest,
double saturation,
boolean pixelate)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
void |
save(java.lang.String filename,
java.lang.String type,
java.lang.String[] optionKeys,
java.lang.String[] optionValues)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
byte[] |
saveToBuffer(java.lang.String type,
java.lang.String[] optionKeys,
java.lang.String[] optionValues)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Pixbuf |
scale(int width,
int height,
InterpType itype)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Pixbuf |
scale(Pixbuf dest,
int destX,
int destY,
int destWidth,
int destHeight,
double offsetX,
double offsetY,
double scaleX,
double scaleY,
InterpType type)
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
int |
width()
Deprecated. Superceeded by java-gnome 4.0; this method or constant will no doubt exist conceptually, but it may have a different name or signature in order that the presented API is an algorithmic mapping of the underlying native libraries. |
Methods inherited from class org.gnu.glib.GObject |
---|
addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addEventHandler, addListener, collect, freezeNotify, getBooleanProperty, getData, getDoubleProperty, getEventListenerClass, getEventType, getFloatProperty, getGObjectFromHandle, getIntProperty, getJavaObjectProperty, getLongProperty, getProperty, getStringProperty, hasProperty, notify, removeEventHandler, removeListener, setBooleanProperty, setData, setDoubleProperty, setFloatProperty, setIntProperty, setJavaObjectProperty, setLongProperty, setProperty, setStringProperty, thawNotify |
Methods inherited from class org.gnu.glib.Struct |
---|
equals, getHandle, getNullHandle, hashCode |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Pixbuf(org.gnu.glib.Handle handle)
public Pixbuf(java.lang.String filename) throws java.io.FileNotFoundException, org.gnu.glib.JGException
filename
- The name of the image file.
java.io.FileNotFoundException
- if filename doesn't exist.
org.gnu.glib.JGException
public Pixbuf(java.lang.String filename, int width, int height, boolean preserveAspect) throws java.io.FileNotFoundException, org.gnu.glib.JGException
filename
- width
- height
- preserveAspect
-
java.io.FileNotFoundException
org.gnu.glib.JGException
public Pixbuf(Colorspace colorSpace, boolean hasAlpha, int bitsPerSample, int width, int height)
colorSpace
- hasAlpha
- bitsPerSample
- width
- height
- public Pixbuf(byte[] data)
data
- public Pixbuf(byte[] data, boolean copyPixels) throws org.gnu.glib.JGException
data
- copyPixels
-
org.gnu.glib.JGException
public Pixbuf(Pixbuf srcPixbuf, int srcX, int srcY, int width, int height)
srcPixbuf
- srcX
- srcY
- width
- height
- public Pixbuf(Drawable drawable, Colormap colormap, int srcX, int srcY, int destX, int destY, int width, int height)
drawable
- colormap
- srcX
- srcY
- destX
- destY
- width
- height
- public Pixbuf(Image image, Colormap colormap, int srcX, int srcY, int destX, int destY, int width, int height)
image
- colormap
- srcX
- srcY
- destX
- destY
- width
- height
- Method Detail |
---|
public static PixbufFormat getFileInformation(java.lang.String filename)
public Pixbuf copy()
public void copyArea(int x, int y, int width, int height, Pixbuf dest, int destX, int destY)
x
- y
- width
- height
- dest
- destX
- destY
- public int width()
public int height()
public Pixbuf scale(int width, int height, InterpType itype)
public Pixbuf scale(Pixbuf dest, int destX, int destY, int destWidth, int destHeight, double offsetX, double offsetY, double scaleX, double scaleY, InterpType type)
dest
- destX
- destY
- destWidth
- destHeight
- offsetX
- offsetY
- scaleX
- scaleY
- type
- public Pixbuf composite(int width, int height, InterpType type, int overallAlpha, int checkSize, int color1, int color2)
width
- height
- type
- overallAlpha
- checkSize
- color1
- color2
- public Pixbuf composite(Pixbuf dest, int destX, int destY, int destWidth, int destHeight, double offsetX, double offsetY, double scaleX, double scaleY, InterpType type, int overallAlpha)
dest
- destX
- destY
- destWidth
- destHeight
- offsetX
- offsetY
- scaleX
- scaleY
- type
- overallAlpha
- public Pixbuf composite(Pixbuf dest, int destX, int destY, int destWidth, int destHeight, double offsetX, double offsetY, double scaleX, double scaleY, InterpType type, int overallAlpha, int checkX, int checkY, int checkSize, int color1, int color2)
dest
- destX
- destY
- destWidth
- destHeight
- offsetX
- offsetY
- scaleX
- scaleY
- type
- overallAlpha
- checkX
- checkY
- checkSize
- color1
- color2
- public Pixbuf rotate(PixbufRotation direction)
direction
- public Pixbuf flip(boolean horizontal)
horizontal
- public Colorspace getColorspace()
public int getNumChannels()
public boolean hasAlpha()
public int getBitsPerSample()
public byte[] getPixels()
public int getRowstride()
public java.lang.String getOption(java.lang.String key)
public void save(java.lang.String filename, java.lang.String type, java.lang.String[] optionKeys, java.lang.String[] optionValues) throws org.gnu.glib.JGException
filename
- type
- optionKeys
- optionValues
-
org.gnu.glib.JGException
public byte[] saveToBuffer(java.lang.String type, java.lang.String[] optionKeys, java.lang.String[] optionValues) throws org.gnu.glib.JGException
type
- optionKeys
- optionValues
-
org.gnu.glib.JGException
public Pixbuf addAlpha(boolean substituteColor, int red, int green, int blue)
If substituteColor is true the color specified by (red, green, blue) will be assigned zero opacity. That is, if you pass (255, 255, 255) for the substitute color all white pixels will become fully transparent.
substituteColor
- red
- green
- blue
- public void fill(int pixel)
pixel
- public Pixbuf saturateAndPixelate(Pixbuf dest, double saturation, boolean pixelate)
dest
- saturation
- pixelate
- public static org.gnu.glib.Type getType()
public static Pixbuf getPixbufFromHandle(org.gnu.glib.Handle hndl)
Pixbuf(Handle)
unless the call is being made by a subclass of
Pixbuf from its own Handle constructor.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |