3261N/A * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 2362N/A * published by the Free Software Foundation. Oracle designates this 0N/A * particular file as subject to the "Classpath" exception as provided 2362N/A * by Oracle in the LICENSE file that accompanied this code. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A * This structure contains all of the information about a particular 0N/A * type of GraphicsPrimitive, such as a FillRect, a MaskFill, or a Blit. 0N/A * A global collection of these structures is declared and initialized 0N/A * to contain the necessary Java (JNI) information so that appropriate 0N/A * Java GraphicsPrimitive objects can be quickly constructed for a set 0N/A * of native loops simply by referencing the necessary entry from that 0N/A * collection for the type of primitive being registered. 0N/A * See PrimitiveTypes.{Blit,BlitBg,FillRect,...} below. 0N/A/* The integer constants to identify the compositing rule being defined. */ 0N/A * This structure holds the information retrieved from a Java 0N/A * Composite object for easy transfer to various C functions 0N/A * that implement the inner loop for a native primitive. 0N/A * Currently only AlphaComposite and XORComposite are supported. 0N/A * This structure is the common header for the two native structures 0N/A * that hold information about a particular SurfaceType or CompositeType. 0N/A * A global collection of these structures is declared and initialized 0N/A * to contain the necessary Java (JNI) information so that appropriate 0N/A * Java GraphicsPrimitive objects can be quickly constructed for a set 0N/A * of native loops simply by referencing the necessary entry from that 0N/A * collection for the type of composite or surface being implemented. 0N/A * See SurfaceTypes.{OpaqueColor,IntArgb,ByteGray,...} below. 0N/A * See CompositeTypes.{Xor,AnyAlpha,...} below. 0N/A * The definitions for the SurfaceType structure described above. 0N/A * The signature for a function that returns the specific integer 0N/A * format pixel for a given ARGB color value for a particular 0N/A * SurfaceType implementation. 0N/A * This function is valid only after GetRasInfo call for the 0N/A * associated surface. 0N/A * The additional information needed to manipulate a surface: 0N/A * - The pixelFor function for translating ARGB values. 0N/A * Valid only after GetRasInfo call for this surface. 0N/A * - The additional flags needed when reading from this surface. 0N/A * - The additional flags needed when writing to this surface. 0N/A * The definitions for the CompositeType structure described above. 0N/A * The signature for a function that fills in a CompositeInfo 0N/A * structure from the information present in a given Java Composite 0N/A * The additional information needed to implement a primitive that 0N/A * performs a particular composite operation: 0N/A * - The getCompInfo function for filling in a CompositeInfo structure. 0N/A * - The additional flags needed for locking the destination surface. 0N/A * The signature of the native functions that register a set of 0N/A * related native GraphicsPrimitive functions. 0N/A * This empty function signature represents an "old pre-ANSI style" 0N/A * function declaration which makes no claims about the argument list 0N/A * other than that the types of the arguments will undergo argument 0N/A * promotion in the calling conventions. 0N/A * (See section A7.3.2 in K&R 2nd edition.) 0N/A * When trying to statically initialize the function pointer field of 0N/A * a NativePrimitive structure, which is a union of all possible 0N/A * inner loop function signatures, the initializer constant must be 0N/A * compatible with the first field in the union. This generic function 0N/A * type allows us to assign any function pointer to that union as long 0N/A * as it meets the requirements specified above (i.e. all arguments 0N/A * are compatible with their promoted values according to the old 0N/A * style argument promotion calling semantics). 0N/A * Note: This means that you cannot define an argument to any of 0N/A * these native functions which is a byte or a short as that value 0N/A * would not be passed in the same way for an ANSI-style full prototype 0N/A * calling convention and an old-style argument promotion calling 0N/A * The signature of the inner loop function for a "Blit". 0N/A * The signature of the inner loop function for a "BlitBg". 0N/A * The signature of the inner loop function for a "ScaleBlit". 0N/A * The signature of the inner loop function for a "FillRect". 0N/A * The signature of the inner loop function for a "FillSpans". 0N/A * The signature of the inner loop function for a "DrawLine". 0N/A * Note that this same inner loop is used for native DrawRect 0N/A * and DrawPolygons primitives. 0N/A * The signature of the inner loop function for a "MaskFill". 0N/A * The signature of the inner loop function for a "MaskBlit". 0N/A * The signature of the inner loop function for a "DrawGlyphList". 0N/A * The signature of the inner loop function for a "DrawGlyphListAA". 0N/A * The signature of the inner loop function for a "DrawGlyphListLCD". 0N/A * rgbOrder is a jint rather than a jboolean so that this typedef matches 0N/A * AnyFunc which is the first element in a union in NativePrimitive's 0N/A * initialiser. See the comments alongside declaration of the AnyFunc type for 0N/A * a full explanation. 0N/A * The signature of the inner loop functions for a "TransformHelper". 3172N/A * The signature of the inner loop function for a "FillParallelogram" 3172N/A * Note that this same inner loop is used for native DrawParallelogram 3172N/A * Note that these functions are paired with equivalent DrawLine 3172N/A * inner loop functions to facilitate nicer looking and faster thin 3172N/A * transformed drawrect calls. 0N/A * This structure contains all information for defining a single 0N/A * native GraphicsPrimitive, including: 0N/A * - The information about the type of the GraphicsPrimitive subclass. 0N/A * - The information about the type of the source surface. 0N/A * - The information about the type of the compositing operation. 0N/A * - The information about the type of the destination surface. 0N/A * - A pointer to the function that performs the actual inner loop work. 0N/A * - Extra flags needed for locking the source and destination surfaces 0N/A * above and beyond the flags specified in the Primitive, Composite 0N/A * and SurfaceType structures. (For most native primitives these 0N/A * flags can be calculated automatically from information stored in 0N/A * the PrimitiveType, SurfaceType, and CompositeType structures.) 0N/A /* See declaration of AnyFunc type above for comments explaining why 0N/A * only AnyFunc is used by the initializers for these union fields 0N/A * and consequent type restrictions. 0N/A * This function should be defined to return a pointer to 0N/A * an accelerated version of a primitive function 'func_c' 0N/A * if it exists and to return a copy of the input parameter 0N/A * The global collection of all primitive types. Specific NativePrimitive 0N/A * structures can be statically initialized by pointing to these structures. 0N/A * The global collection of all surface types. Specific NativePrimitive 0N/A * structures can be statically initialized by pointing to these structures. 0N/A * The global collection of all composite types. Specific NativePrimitive 0N/A * structures can be statically initialized by pointing to these structures. 0N/A * The function to call with an array of NativePrimitive structures 0N/A * to register them with the Java GraphicsPrimitiveMgr. 0N/A * The utility function to retrieve the NativePrimitive structure 0N/A * from a given Java GraphicsPrimitive object. 0N/A * Utility functions to get values from a Java SunGraphics2D or Color object. 0N/A * Data structure and functions to retrieve and use 0N/A * AffineTransform objects from the native level. 0N/A * Macros for using jlong variables as 32bits.32bits fractional values 0N/A * Macros to help in defining arrays of NativePrimitive structures. 0N/A * These macros are the very base macros. More specific macros are 0N/A * Note that the DrawLine, DrawRect, and DrawPolygons primitives are 0N/A * all registered together from a single shared native function pointer. 0N/A#
endif /* GraphicsPrimitiveMgr_h_Included */