[cairo-commit]
cairo-java/src/java/org/freedesktop/cairo Cairo.java, 1.12,
1.13 ImageSurface.java, 1.5, 1.6
Jeffrey Morgan
commit at pdx.freedesktop.org
Mon Apr 4 17:37:01 PDT 2005
Committed by: kuzman
Update of /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo
In directory gabe:/tmp/cvs-serv30279/src/java/org/freedesktop/cairo
Modified Files:
Cairo.java ImageSurface.java
Log Message:
fixed bug in ImageSurface and changed image data from byte[] to char[]
Index: Cairo.java
===================================================================
RCS file: /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo/Cairo.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- Cairo.java 2 Apr 2005 13:46:40 -0000 1.12
+++ Cairo.java 5 Apr 2005 00:36:59 -0000 1.13
@@ -1111,12 +1111,12 @@
native static final private int cairo_get_line_join(Handle obj);
native static final private double cairo_get_miter_limit(Handle obj);
native static final private void cairo_get_matrix(Handle obj, Handle matrix);
- native static final private Handle cairo_get_target_surface(Handle obj);
+ native static final Handle cairo_get_target_surface(Handle obj);
native static final private int cairo_status(Handle obj);
native static final private String cairo_status_string(Handle obj);
native static final private void cairo_get_path(Handle obj, Object cairo);
native static final private void cairo_get_path_flat(Handle obj, Object cairo);
// used by ImageSurface
- native static final void cairo_set_target_image(Handle obj, byte[] data, int format, int width, int height, int stride);
+ native static final void cairo_set_target_image(Handle obj, char[] data, int format, int width, int height, int stride);
native static final void cairo_set_target_image_no_data(Handle obj, int format, int width, int height);
}
\ No newline at end of file
Index: ImageSurface.java
===================================================================
RCS file: /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo/ImageSurface.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ImageSurface.java 2 Apr 2005 16:07:34 -0000 1.5
+++ ImageSurface.java 5 Apr 2005 00:36:59 -0000 1.6
@@ -19,7 +19,7 @@
private int width;
private int height;
private int stride;
- private byte[] data = null;
+ private char[] data = null;
public ImageSurface(Format format, int width, int height) {
super(cairo_image_surface_create(format.getValue(), width, height));
@@ -28,7 +28,7 @@
this.height = height;
}
- public ImageSurface(byte[] data, Format format, int width, int height, int stride) {
+ public ImageSurface(char[] data, Format format, int width, int height, int stride) {
super(cairo_image_surface_create_for_data(data, format.getValue(), width, height, stride));
this.format = format;
this.width = width;
@@ -46,11 +46,12 @@
Cairo.cairo_set_target_image_no_data(cr.getHandle(), format.getValue(), width, height);
else
Cairo.cairo_set_target_image(cr.getHandle(), data, format.getValue(), width, height, stride);
+ setHandle(Cairo.cairo_get_target_surface(cr.getHandle()));
}
/*
* Native calls
*/
native static final private Handle cairo_image_surface_create(int format, int width, int height);
- native static final private Handle cairo_image_surface_create_for_data(byte[] data, int format, int width, int height, int stride);
+ native static final private Handle cairo_image_surface_create_for_data(char[] data, int format, int width, int height, int stride);
}
More information about the cairo-commit
mailing list