[cairo-commit]
cairo-java/src/java/org/freedesktop/cairo Cairo.java, 1.5, 1.6
Jeffrey Morgan
commit at pdx.freedesktop.org
Thu Mar 10 11:04:18 PST 2005
Committed by: kuzman
Update of /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo
In directory gabe:/tmp/cvs-serv7847/src/java/org/freedesktop/cairo
Modified Files:
Cairo.java
Log Message:
current path work
Index: Cairo.java
===================================================================
RCS file: /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo/Cairo.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Cairo.java 10 Mar 2005 14:50:34 -0000 1.5
+++ Cairo.java 10 Mar 2005 19:04:14 -0000 1.6
@@ -13,6 +13,8 @@
public class Cairo extends CairoObject {
+ private CurrentPath currentPath;
+
/**
* Create a new cairo target (cairo_t)
*/
@@ -997,13 +999,31 @@
}
public void setCurrentPath(CurrentPath path) {
- cairo_current_path(getHandle(), path);
+ currentPath = path;
+ cairo_current_path(getHandle(), this);
}
public void setCurrentPathFlat(CurrentPath path) {
- cairo_current_path_flat(getHandle(), path);
+ currentPath = path;
+ cairo_current_path_flat(getHandle(), this);
}
+ private void move_to(double x, double y) {
+ System.out.println("moveTo");
+ currentPath.moveTo(x, y);
+ }
+
+ private void line_to(double x, double y) {
+ currentPath.lineTo(x, y);
+ }
+
+ private void curve_to(double x1, double y1, double x2, double y2, double x3, double y3) {
+ currentPath.curveTo(x1, y1, x2, y2, x3, y3);
+ }
+
+ private void close_path() {
+ currentPath.closePath();
+ }
/*
* Native calls
@@ -1094,6 +1114,6 @@
native static final private Handle cairo_current_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_current_path(Handle obj, Object curPath);
- native static final private void cairo_current_path_flat(Handle obj, Object curPath);
+ native static final private void cairo_current_path(Handle obj, Object cairo);
+ native static final private void cairo_current_path_flat(Handle obj, Object cairo);
}
\ No newline at end of file
More information about the cairo-commit
mailing list