[cairo-commit] cairo-java/src/java/org/freedesktop/cairo Cairo.java, 1.16, NONE PdfSurface.java, 1.7, 1.8 BoundingBox.java, 1.1, NONE Box.java, NONE, 1.1 Context.java, NONE, 1.1 Surface.java, 1.5, 1.6 ImageSurface.java, 1.6, 1.7 PsSurface.java, 1.3, NONE

Jeffrey Morgan commit at pdx.freedesktop.org
Mon May 2 18:36:17 PDT 2005


Committed by: kuzman

Update of /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo
In directory gabe:/tmp/cvs-serv8526/src/java/org/freedesktop/cairo

Modified Files:
	PdfSurface.java Surface.java ImageSurface.java 
Added Files:
	Box.java Context.java 
Removed Files:
	Cairo.java BoundingBox.java PsSurface.java 
Log Message:
Renamed BoundingBox to Box, Cairo to Context, and removed PsSurface

--- Cairo.java DELETED ---

Index: PdfSurface.java
===================================================================
RCS file: /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo/PdfSurface.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- PdfSurface.java	1 Apr 2005 13:58:45 -0000	1.7
+++ PdfSurface.java	3 May 2005 01:36:15 -0000	1.8
@@ -63,7 +63,7 @@
 		return cairo_pdf_surface_create(filename, widthInches, heightInches, xPixels, yPixels);
 	}
 	
-	void makeTarget(Cairo cr) {
+	void makeTarget(Context cr) {
 		cairo_set_target_pdf(cr.getHandle(), getHandle(), width, height, xPixels, yPixels);
 	}
 

--- BoundingBox.java DELETED ---

--- NEW FILE: Box.java ---
/*
 * Java-Gnome Bindings Library
 *
 * Copyright 1998-2005 the Java-Gnome Team, all rights reserved.
 *
 * The Java-Gnome bindings library is free software distributed under
 * the terms of the GNU Library General Public License version 2.
 */
package org.freedesktop.cairo;

public class Box {
    
    double x1;
    double y1;
    double x2;
    double y2;
    
    public Box(double x1, double y1, double x2, double y2) {
        this.x1 = x1;
        this.y1 = y1;
        this.x2 = x2;
        this.y2 = y2;
    }
    

    public double getX1() {
        return x1;
    }
    public void setX1(double x1) {
        this.x1 = x1;
    }
    public double getX2() {
        return x2;
    }
    public void setX2(double x2) {
        this.x2 = x2;
    }
    public double getY1() {
        return y1;
    }
    public void setY1(double y1) {
        this.y1 = y1;
    }
    public double getY2() {
        return y2;
    }
    public void setY2(double y2) {
        this.y2 = y2;
    }
}

--- NEW FILE: Context.java ---
/*
 * Java-Gnome Bindings Library
 *
 * Copyright 1998-2005 the Java-Gnome Team, all rights reserved.
 *
 * The Java-Gnome bindings library is free software distributed under
 * the terms of the GNU Library General Public License version 2.
 */
package org.freedesktop.cairo;

import org.gnu.javagnome.Struct;
import org.gnu.javagnome.Handle;

public class Context extends CairoObject {
	
	private CurrentPath currentPath;
	
	/**
	 * Create a new cairo target (cairo_t) 
[...1113 lines suppressed...]
	native static final private void cairo_get_rgb_color(Handle obj, double[] red, double[] green, double[] blue);
	native static final private Handle cairo_get_source(Handle obj);
	native static final private double cairo_get_alpha(Handle obj);
	native static final private double cairo_get_tolerance(Handle obj);
	native static final private void cairo_get_current_point(Handle obj, double[] x, double[] y);
	native static final private int cairo_get_fill_rule(Handle obj);
	native static final private double cairo_get_line_width(Handle obj);
	native static final private int cairo_get_line_cap(Handle obj);
	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 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, 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);
}
Index: Surface.java
===================================================================
RCS file: /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo/Surface.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- Surface.java	2 Apr 2005 11:46:23 -0000	1.5
+++ Surface.java	3 May 2005 01:36:15 -0000	1.6
@@ -87,8 +87,8 @@
     	cairo_surface_set_device_offset(getHandle(), xOffset, yOffset);
     }
     
-    void makeTarget(Cairo cairo) {
-    	Cairo.cairo_set_target_surface(cairo.getHandle(), getHandle());
+    void makeTarget(Context cairo) {
+    	Context.cairo_set_target_surface(cairo.getHandle(), getHandle());
     }
 
     /*

Index: ImageSurface.java
===================================================================
RCS file: /cvs/cairo/cairo-java/src/java/org/freedesktop/cairo/ImageSurface.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- ImageSurface.java	5 Apr 2005 00:36:59 -0000	1.6
+++ ImageSurface.java	3 May 2005 01:36:15 -0000	1.7
@@ -41,12 +41,12 @@
 		super(hndl);
 	}
 	
-	void makeTarget(Cairo cr) {
+	void makeTarget(Context cr) {
 		if (null == data)
-			Cairo.cairo_set_target_image_no_data(cr.getHandle(), format.getValue(), width, height);
+			Context.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()));
+			Context.cairo_set_target_image(cr.getHandle(), data, format.getValue(), width, height, stride);
+		setHandle(Context.cairo_get_target_surface(cr.getHandle()));
 	}
 	
 	/*

--- PsSurface.java DELETED ---




More information about the cairo-commit mailing list