[cairo-commit] cairo-java/src/java/org/freedesktop/cairo
Surface.java, 1.15, 1.16
Jeffrey Morgan
commit at pdx.freedesktop.org
Tue Aug 16 17:34:35 PDT 2005
Committed by: kuzman
Update of /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo
In directory gabe:/tmp/cvs-serv19721/src/java/org/freedesktop/cairo
Modified Files:
Surface.java
Log Message:
Applied a patch from Owen and updated the examples.
Index: Surface.java
===================================================================
RCS file: /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo/Surface.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- Surface.java 17 Aug 2005 00:23:44 -0000 1.15
+++ Surface.java 17 Aug 2005 00:34:31 -0000 1.16
@@ -8,6 +8,8 @@
*/
package org.freedesktop.cairo;
+import java.io.OutputStream;
+
import org.gnu.javagnome.Handle;
/**
@@ -42,6 +44,10 @@
cairo_surface_write_to_png(getHandle(), filename);
}
+ public void writeToPNG(OutputStream ostream) {
+ cairo_surface_write_to_png_stream(getHandle(), ostream);
+ }
+
public FontOptions getFontOptions() {
return new FontOptions(cairo_surface_get_font_options(getHandle()));
}
@@ -66,11 +72,7 @@
native static final private int cairo_surface_finish(Handle obj);
native static final private int cairo_surface_write_to_png(Handle obj, String filename);
-// native static final private int cairo_surface_write_to_png_stream(Handle obj, String func);
-// cairo_status_t
-// cairo_surface_write_to_png_stream (cairo_surface_t *surface,
-// cairo_write_func_t write_func,
-// void *closure);
+ native static final private int cairo_surface_write_to_png_stream(Handle obj, OutputStream ostream);
native static final private void cairo_surface_set_device_offset(Handle obj, double xOff, double yOff);
native static final private Handle cairo_surface_get_font_options(Handle obj);
More information about the cairo-commit
mailing list