All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object
|
+----WBMPcreator.WBMPfile
public static final int MIX_MODE_XOR
public static final int MIX_MODE_AND
public static final int MIX_MODE_OR
public static final int MIX_MODE_NOT
public static final int APPEND_MODE_DIVISION
public static final int APPEND_MODE_CONTINUOUS
public static final int LINE_POINT1
public static final int LINE_POINT2
public static final int LINE_POINT3
public static final int LINE_INT2_1
public static final int LINE_INT2_2
public static final int LINE_INT3_2
public static final int LINE_CHAIN3_1
public static final int LINE_CHAIN3_2
public WBMPfile()
public WBMPfile(java.lang.String filename)
public WBMPfile(int length,
int width)
length - the length of a WBMP file in pixels
width - the width of a WBMP image in pixels
public WBMPfile(int length,
int width,
int picData[][])
length - the length of a WBMP file in pixels
width - the width of a WBMP image in pixels
picData - the array of points of a WBMP file
public WBMPfile(java.lang.String url,
int port)
url - the URL of a wbmp file. MUST be with "http://" or another beginning.
port - port for the URL (for HTTP it is 80)
public void setWBMPLength(int newLength)
public int getWBMPLength()
public void setWBMPWidth(int newWidth)
public int getWBMPWidth()
public void createWBMPFile()
length and width must be specified before!public void destroyWBMPFile()
public void setElementAt(int X,
int Y,
int value)
public int getElementAt(int X,
int Y)
public void saveWBMP2File(java.lang.String filename)
filename - the filename of a resulting image.
public WBMPfile openWBMPFile(java.lang.String filename)
filename - the name of a file to be read.
public void printWBMPImage()
public void invertWBMPImage()
public WBMPfile mix(WBMPfile layer1,
int mixMode)
layer1 - the upper layer (the given picture)
mixMode - the way to mix the pictures
public WBMPfile mix(WBMPfile layer1,
int mixMode,
int X,
int Y)
layer1 - the upper layer (the given picture)
mixMode - the way to mix the pictures
X - the upper left X coordinate of the lower layer
Y - the upper left Y coorinate of the lower layer
public void drawString(java.lang.String text,
int X,
int Y,
java.awt.Font inFont)
text - the text to be drawn
X - the lower left X coordinate of the layer
Y - the lower left Y coordinate of the layer
NOTE that it can work on Java version 1.2 and higher platforms.
public void drawLine(int x_1,
int y_1,
int x_2,
int y_2)
x_1 - X coordinate of FROM point
y_1 - Y coordinate of FROM point
x_2 - X coordinate of TO point
y_2 - Y coordinate of TO point
Benchmark: Intel Pentium III - 600, 128 Mb RAM PC-133 0(!!!)ms
public void drawOval(int x,
int y,
int length,
int width,
boolean isFilled)
x - X coordinate of left upper corner
y - Y coordinate of left upper corner
length - length of the oval
width - width of the oval
isFilled - fills (true) or not (false) the oval
Benchmark: Intel Pentium III - 600, 128 Mb RAM PC-133 0(!!!)ms
public void drawPoint(int x,
int y,
int color)
x - X coordinate of a point
y - Y coordinate of a point
color - the color of a point.
NOTE! Due to WAP phones support only b&w picture mode, it's better to
use 1 and 0 colors.
public void drawRect(int x,
int y,
int length,
int width,
boolean isFilled)
x - X coordinate of upper left corner of a rectangle
y - Y coordinate of upper left corner of a rectangle
length - length of a rectangle
width - width of a rectangle
isFilled - fills (true) or not (false) the rectangle
Benchmark: Intel Pentium III - 600, 128 Mb RAM PC-133 0(!!!)ms
public void draw3DRect(int x,
int y,
int length,
int width,
boolean isFilled,
boolean isRaised)
x - X coordinate of upper left corner of a 3D rectangle
y - Y coordinate of upper left corner of a 3D rectangle
length - length of a 3D rectangle
width - width of a 3D rectangle
isFilled - fills (true) or not (false) a 3D rectangle
isRaised - is the border raised? true/false
Benchmark: Intel Pentium III - 600, 128 Mb RAM PC-133 0(!!!)ms
public void drawArc(int x,
int y,
int width,
int height,
int startAngle,
int arcAngle)
x - the X coordinate of the left upper point of a rectangle containing the arc
y - the X coordinate of the left upper point of a rectangle containing the arc
width - the width of a rectangle containing the arc
height - the height of a rectangle containing the arc
startAngle - refer to java.awt.Graphics for details
arcAngle - refer to java.awt.Graphics for details
Benchmark: Intel Pentium III - 600, 128 Mb RAM PC-133 0(!!!)ms
public java.lang.String getString()
saveWBMP2File() writes the file to the disk and
this metod returns a string available fo any future use.public WBMPfile rotate(int angle)
angle variableangle - an integer representing quantity of Pi/2 rotations in
positive direction (mathematicians will understand me :-|). I.e. if
angle equals 0 then the image remains the same. If angle is even then
dimensions also remain the same and if it is equal to n*4 where n is
an integer then the picture returned is equal to current. Odd values
of angle modify dimensions.
public WBMPfile getRectArea(WBMPDimension area)
area - a dimension
public java.io.PrintStream getStream()
public int[][] getWBMPpic()
public boolean writeToOutputStream(java.io.OutputStream os)
os - the OutputStream where data should be writtentrue if the operation succeeded;false otherwise.
public void drawCircle(int x,
int y,
int radius,
int color,
boolean isFilled)
x - the centre point x axis coordinate
y - the centre point y axis coordinate
radius - the radius of a circle
color - the color of a circle
isFilled - is the circle filled
public void drawSpecialLine(int x1,
int y1,
int x2,
int y2,
int line_type,
int color)
x1 - the first point x axis coordinate
y1 - the first point y axis coordinate
x2 - the second point x axis coordinate
y2 - the second point y axis coordinate
line_type - the type of a special line
color - the color of a line
All Packages Class Hierarchy This Package Previous Next Index