[cairo-commit] CairoJava/jni CairoPattern.cpp, NONE, 1.1 CairoRadialPattern.cpp, NONE, 1.1

Soorya Kuloor commit at pdx.freedesktop.org
Fri Apr 30 10:47:07 PDT 2004


Committed by: skuloor

Update of /cvs/cairo/CairoJava/jni
In directory pdx:/tmp/cvs-serv13805/jni

Added Files:
	CairoPattern.cpp CairoRadialPattern.cpp 
Log Message:
Initial version

--- NEW FILE: CairoPattern.cpp ---
/*
 * $Id: Cairo.java,v 1.5 2003/12/23 17:36:01 skuloor Exp $
 * 
 * Copyright (C) 2003 Verano
 * 
 * Permission to use, copy, modify, distribute, and sell this software and its
 * documentation for any purpose is hereby granted without fee, provided that
 * the above copyright notice appear in all copies and that both that copyright
 * notice and this permission notice appear in supporting documentation, and
 * that the name of Verano not be used in advertising or publicity pertaining to
 * distribution of the software without specific, written prior permission.
 * Verano makes no representations about the suitability of this software for
 * any purpose. It is provided "as is" without express or implied warranty.
 * 
 * VERANO MAKES NO REPRESENTATIONS OR WARRANTIES OR COVENANTS, EITHER EXPRESS OR
 * IMPLIED, WITH RESPECT TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION,
 * STATUTORY OR IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, FITNESS FOR
 * A PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT, OR ARISING FROM CUSTOM, COURSE
 * OF DEALING, USAGE OF TRADE OR COURSE OF PERFORMANCE, ALL OF WHICH ARE
 * EXPRESSLY DISCLAIMED TO THE FULLEST EXTENT ALLOWABLE BY APPLICABLE LAW. IN NO
 * EVENT SHALL VERANO BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 * SOFTWARE.
 */
#include <cairo.h>
#include "CairoPattern.h"
#include "utils.h"

/*
 * Class:     org_cairographics_cairo_CairoPattern
 * Method:    cairo_pattern_reference
 * Signature: (J)V
 */
JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1reference
(JNIEnv *env, jclass me, jlong patternp)
{
    cairo_pattern_reference(TO_PTR(cairo_pattern_t, patternp));
}

/*
 * Class:     org_cairographics_cairo_CairoPattern
 * Method:    cairo_pattern_destroy
 * Signature: (J)V
 */
JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1destroy
(JNIEnv *env, jclass me, jlong patternp)
{
    cairo_pattern_destroy(TO_PTR(cairo_pattern_t, patternp));
}

/*
 * Class:     org_cairographics_cairo_CairoPattern
 * Method:    cairo_pattern_add_color_stop
 * Signature: (JDDDDD)V
 */
JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1add_1color_1stop
(JNIEnv *env, jclass me, jlong patternp, jdouble offset, jdouble r, jdouble g, jdouble b, jdouble alpha)
{
    cairo_pattern_add_color_stop(TO_PTR(cairo_pattern_t, patternp),
                                 offset, r, g, b, alpha);
}

/*
 * Class:     org_cairographics_cairo_CairoPattern
 * Method:    cairo_pattern_set_matrix
 * Signature: (JJ)V
 */
JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1set_1matrix
(JNIEnv *env, jclass me, jlong patternp, jlong matrixp)
{
    cairo_pattern_set_matrix(TO_PTR(cairo_pattern_t, patternp), TO_PTR(cairo_matrix_t, matrixp));
}

/*
 * Class:     org_cairographics_cairo_CairoPattern
 * Method:    cairo_pattern_get_matrix
 * Signature: (JJ)V
 */
JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1get_1matrix
(JNIEnv *env, jclass me, jlong patternp, jlong matrixp)
{
    cairo_pattern_get_matrix(TO_PTR(cairo_pattern_t, patternp), TO_PTR(cairo_matrix_t, matrixp));
}

/*
 * Class:     org_cairographics_cairo_CairoPattern
 * Method:    cairo_pattern_set_extend
 * Signature: (JS)V
 */
JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1set_1extend
(JNIEnv *env, jclass me, jlong patternp, jshort extend)
{
    cairo_pattern_set_extend(TO_PTR(cairo_pattern_t, patternp), (cairo_extend_t) extend);
}

/*
 * Class:     org_cairographics_cairo_CairoPattern
 * Method:    cairo_pattern_get_extend
 * Signature: (J)S
 */
JNIEXPORT jshort JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1get_1extend
  (JNIEnv *env, jclass me, jlong patternp)
{
    return cairo_pattern_get_extend(TO_PTR(cairo_pattern_t, patternp));
}

/*
 * Class:     org_cairographics_cairo_CairoPattern
 * Method:    cairo_pattern_set_filter
 * Signature: (JS)V
 */
JNIEXPORT void JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1set_1filter
(JNIEnv *env, jclass me, jlong patternp, jshort extend)
{
    cairo_pattern_set_filter(TO_PTR(cairo_pattern_t, patternp), (cairo_filter_t) extend);
}

/*
 * Class:     org_cairographics_cairo_CairoPattern
 * Method:    cairo_pattern_get_filter
 * Signature: (J)S
 */
JNIEXPORT jshort JNICALL Java_org_cairographics_cairo_CairoPattern_cairo_1pattern_1get_1filter
  (JNIEnv *env, jclass me, jlong patternp)
{
    return cairo_pattern_get_filter(TO_PTR(cairo_pattern_t, patternp));
}

--- NEW FILE: CairoRadialPattern.cpp ---
/*
 * $Id: Cairo.java,v 1.5 2003/12/23 17:36:01 skuloor Exp $
 * 
 * Copyright (C) 2003 Verano
 * 
 * Permission to use, copy, modify, distribute, and sell this software and its
 * documentation for any purpose is hereby granted without fee, provided that
 * the above copyright notice appear in all copies and that both that copyright
 * notice and this permission notice appear in supporting documentation, and
 * that the name of Verano not be used in advertising or publicity pertaining to
 * distribution of the software without specific, written prior permission.
 * Verano makes no representations about the suitability of this software for
 * any purpose. It is provided "as is" without express or implied warranty.
 * 
 * VERANO MAKES NO REPRESENTATIONS OR WARRANTIES OR COVENANTS, EITHER EXPRESS OR
 * IMPLIED, WITH RESPECT TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION,
 * STATUTORY OR IMPLIED WARRANTIES OR CONDITIONS OF MERCHANTABILITY, FITNESS FOR
 * A PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT, OR ARISING FROM CUSTOM, COURSE
 * OF DEALING, USAGE OF TRADE OR COURSE OF PERFORMANCE, ALL OF WHICH ARE
 * EXPRESSLY DISCLAIMED TO THE FULLEST EXTENT ALLOWABLE BY APPLICABLE LAW. IN NO
 * EVENT SHALL VERANO BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL
 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
 * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
 * SOFTWARE.
 */
 
#include <cairo.h>
#include "CairoRadialPattern.h"
#include "utils.h"

/*
 * Class:     org_cairographics_cairo_CairoRadialPattern
 * Method:    cairo_pattern_create_radial
 * Signature: (DDDDDD)J
 */
JNIEXPORT jlong JNICALL Java_org_cairographics_cairo_CairoRadialPattern_cairo_1pattern_1create_1radial
(JNIEnv *env, jclass me, jdouble cx0, jdouble cy0, jdouble r0, jdouble cx1, jdouble cy1, jdouble r1)
{
    return TO_LONG(cairo_pattern_create_radial(cx0, cy0, r0, cx1, cy1, r1));
}






More information about the cairo-commit mailing list