[cairo-commit] cairo-java/src/jni org_freedesktop_cairo_Pattern.c, 1.5, 1.6

Jeffrey Morgan commit at pdx.freedesktop.org
Sat Jul 2 04:10:56 PDT 2005


Committed by: kuzman

Update of /cvs/cairo/cairo-java/src/jni
In directory gabe:/tmp/cvs-serv1278/src/jni

Modified Files:
	org_freedesktop_cairo_Pattern.c 
Log Message:
added two additional constructors to Pattern.

Index: org_freedesktop_cairo_Pattern.c
===================================================================
RCS file: /cvs/cairo/cairo-java/src/jni/org_freedesktop_cairo_Pattern.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- org_freedesktop_cairo_Pattern.c	26 Jun 2005 23:15:49 -0000	1.5
+++ org_freedesktop_cairo_Pattern.c	2 Jul 2005 11:10:54 -0000	1.6
@@ -39,6 +39,34 @@
 
 /*
  * Class:     org_freedesktop_cairo_Pattern
+ * Method:    cairo_pattern_create_rgb
+ * Signature: (DDD)Lorg/gnu/javagnome/Handle;
+ */
+JNIEXPORT jobject JNICALL Java_org_freedesktop_cairo_Pattern_cairo_1pattern_1create_1rgb
+  (JNIEnv *env, jclass cls, jdouble red, jdouble green, jdouble blue)
+{
+	cairo_pattern_t *pattern;
+	
+	pattern = cairo_pattern_create_rgb(red, green, blue);
+	return getHandleFromPointer(env, pattern);
+}
+
+/*
+ * Class:     org_freedesktop_cairo_Pattern
+ * Method:    cairo_pattern_create_rgba
+ * Signature: (DDDD)Lorg/gnu/javagnome/Handle;
+ */
+JNIEXPORT jobject JNICALL Java_org_freedesktop_cairo_Pattern_cairo_1pattern_1create_1rgba
+  (JNIEnv *env, jclass cls, jdouble red, jdouble green, jdouble blue, jdouble alpha)
+{
+	cairo_pattern_t *pattern;
+	
+	pattern = cairo_pattern_create_rgba(red, green, blue, alpha);
+	return getHandleFromPointer(env, pattern);
+}
+
+/*
+ * Class:     org_freedesktop_cairo_Pattern
  * Method:    cairo_pattern_create_linear
  * Signature: (DDDD)Lorg/gnu/glib/Handle;
  */
@@ -179,7 +207,7 @@
  * Method:    cairo_pattern_get_filter
  * Signature: (Lorg/gnu/glib/Handle;)I
  */
-JNIEXPORT void JNICALL Java_org_freedesktop_cairo_Pattern_cairo_1pattern_1get_1filter
+JNIEXPORT jint JNICALL Java_org_freedesktop_cairo_Pattern_cairo_1pattern_1get_1filter
   (JNIEnv *env, jclass cls, jobject obj)
 {
 	cairo_pattern_t *pat = (cairo_pattern_t*)getPointerFromHandle(env, obj);




More information about the cairo-commit mailing list