< prev index next >

src/java.desktop/share/native/libawt/java2d/loops/GraphicsPrimitiveMgr.c

Print this page


   1 /*
   2  * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  52 static jfieldID lcdTextContrastID;
  53 static jfieldID xorPixelID;
  54 static jfieldID xorColorID;
  55 static jfieldID alphaMaskID;
  56 static jfieldID ruleID;
  57 static jfieldID extraAlphaID;
  58 
  59 static jfieldID m00ID;
  60 static jfieldID m01ID;
  61 static jfieldID m02ID;
  62 static jfieldID m10ID;
  63 static jfieldID m11ID;
  64 static jfieldID m12ID;
  65 
  66 static jmethodID getRgbID;
  67 
  68 static jboolean InitPrimTypes(JNIEnv *env);
  69 static jboolean InitSurfaceTypes(JNIEnv *env, jclass SurfaceType);
  70 static jboolean InitCompositeTypes(JNIEnv *env, jclass CompositeType);
  71 
  72 jfieldID path2DTypesID;
  73 jfieldID path2DNumTypesID;
  74 jfieldID path2DWindingRuleID;
  75 jfieldID path2DFloatCoordsID;
  76 jfieldID sg2dStrokeHintID;
  77 jint sunHints_INTVAL_STROKE_PURE;
  78 
  79 /*
  80  * Class:     sun_java2d_loops_GraphicsPrimitiveMgr
  81  * Method:    initIDs
  82  * Signature: (Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;)V
  83  */
  84 JNIEXPORT void JNICALL
  85 Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs
  86     (JNIEnv *env, jclass GPMgr,
  87      jclass GP, jclass ST, jclass CT,
  88      jclass SG2D, jclass Color, jclass AT,
  89      jclass XORComp, jclass AlphaComp,
  90      jclass Path2D, jclass Path2DFloat,
  91      jclass SHints)
  92 {
  93     jfieldID fid;
  94     initAlphaTables();
  95     GraphicsPrimitiveMgr = (*env)->NewGlobalRef(env, GPMgr);
  96     GraphicsPrimitive = (*env)->NewGlobalRef(env, GP);
  97     if (GraphicsPrimitiveMgr == NULL || GraphicsPrimitive == NULL) {


   1 /*
   2  * Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


  52 static jfieldID lcdTextContrastID;
  53 static jfieldID xorPixelID;
  54 static jfieldID xorColorID;
  55 static jfieldID alphaMaskID;
  56 static jfieldID ruleID;
  57 static jfieldID extraAlphaID;
  58 
  59 static jfieldID m00ID;
  60 static jfieldID m01ID;
  61 static jfieldID m02ID;
  62 static jfieldID m10ID;
  63 static jfieldID m11ID;
  64 static jfieldID m12ID;
  65 
  66 static jmethodID getRgbID;
  67 
  68 static jboolean InitPrimTypes(JNIEnv *env);
  69 static jboolean InitSurfaceTypes(JNIEnv *env, jclass SurfaceType);
  70 static jboolean InitCompositeTypes(JNIEnv *env, jclass CompositeType);
  71 
  72 JNIEXPORT jfieldID path2DTypesID;
  73 JNIEXPORT jfieldID path2DNumTypesID;
  74 JNIEXPORT jfieldID path2DWindingRuleID;
  75 JNIEXPORT jfieldID path2DFloatCoordsID;
  76 JNIEXPORT jfieldID sg2dStrokeHintID;
  77 JNIEXPORT jint sunHints_INTVAL_STROKE_PURE;
  78 
  79 /*
  80  * Class:     sun_java2d_loops_GraphicsPrimitiveMgr
  81  * Method:    initIDs
  82  * Signature: (Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;Ljava/lang/Class;)V
  83  */
  84 JNIEXPORT void JNICALL
  85 Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs
  86     (JNIEnv *env, jclass GPMgr,
  87      jclass GP, jclass ST, jclass CT,
  88      jclass SG2D, jclass Color, jclass AT,
  89      jclass XORComp, jclass AlphaComp,
  90      jclass Path2D, jclass Path2DFloat,
  91      jclass SHints)
  92 {
  93     jfieldID fid;
  94     initAlphaTables();
  95     GraphicsPrimitiveMgr = (*env)->NewGlobalRef(env, GPMgr);
  96     GraphicsPrimitive = (*env)->NewGlobalRef(env, GP);
  97     if (GraphicsPrimitiveMgr == NULL || GraphicsPrimitive == NULL) {


< prev index next >