com.sun.jimi.core.util.x11
Class XbmParser
java.lang.Object
|
+--com.sun.jimi.core.util.x11.XbmParser
- public class XbmParser
- extends java.lang.Object
X11 bitmap (xbm) parser class.
Parse files of the form:
#define foo_width w
#define foo_height h
static char foo_bits[] = {
0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,
0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,0xnn,
0xnn,0xnn,0xnn,0xnn};
Constructor Summary |
XbmParser(java.io.InputStream is)
Construct and XpmParser from an InputStream |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
XbmParser
public XbmParser(java.io.InputStream is)
- Construct and XpmParser from an InputStream
- Parameters:
is
- the imput stream to parse
parse
public boolean parse()
- Parse input stream.
- Returns:
- true on success.
getWidth
public int getWidth()
- Get image width.
- Returns:
- width in pixels.
getHeight
public int getHeight()
- Get image height.
- Returns:
- height in pixels.
getBitmap
public int[] getBitmap()
- Get pixmap.
- Returns:
- pixmap array.