[Commit] CairoJava/jni libcairoJni.cpp,NONE,1.1 Makefile,NONE,1.1

Soorya Kuloor commit at keithp.com
Wed Aug 6 12:54:05 PDT 2003


Committed by: skuloor

Update of /local/src/CVS/CairoJava/jni
In directory home.keithp.com:/tmp/cvs-serv20525/jni

Added Files:
	libcairoJni.cpp Makefile 
Log Message:
Initial checkin

--- NEW FILE: libcairoJni.cpp ---
/*
 *      $Id: $
 *
 *      (c) Copyright Verano 2003
 *
 *
 * 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 DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
[...1300 lines suppressed...]
 * Signature: (JDDDD)V
 */
JNIEXPORT void JNICALL Java_org_cairographics_cairo_internal_CairoAPI_clipSurface(
    JNIEnv *env, jclass me, jlong xrs,
    int x, int y, int width, int height)
{
    cairo_surface_set_clip_rectangle(
        cairo_get_target_surface(TO_PTR(cairo_t, xrs)), x, y, width, height);
}

/*
 * Class:     org_cairographics_cairo_internal_CairoAPI
 * Method:    transformPoint
 * Signature: (JDD)Lcom/verano/graphics2d/geometry/Point;
 */
JNIEXPORT jdoubleArray JNICALL Java_org_cairographics_cairo_internal_CairoAPI_transformPoint(JNIEnv *env, jclass me, jlong xrsp, jdouble x, jdouble y)
{
    cairo_transform_point(TO_PTR(cairo_t, xrsp), &x, &y);
    return newPoint(env, x, y);
}

--- NEW FILE: Makefile ---
CXXFLAGS=-O3 -g -ffloat-store -fPIC -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -I ./ `pkg-config --cflags cairo` `pkg-config --cflags gtk+-2.0`
LDFLAGS=`pkg-config --libs cairo` `pkg-config --libs gtk+-2.0`
LIBDIR=../lib

all:	$(LIBDIR)/libcairoJni.so

libcairoJni.h:	../bin/org/cairographics/cairo/internal/CairoAPI.class
	$(JAVA_HOME)/bin/javah -o libcairoJni.h -classpath ../bin org.cairographics.cairo.internal.CairoAPI

libcairoJni.o:	libcairoJni.h

$(LIBDIR)/libcairoJni.so:	libcairoJni.o
	mkdir -p $(LIBDIR)
	gcc -shared -O3 -g -ffloat-store -o $@ libcairoJni.o $(LDFLAGS) -lstdc++

clean:
	rm -f libcairoJni.h libcairoJni.o





More information about the Commit mailing list