Path: blob/master/src/java.desktop/share/native/libawt/java2d/loops/ByteBinary4Bit.c
41159 views
/*1* Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425#include "ByteBinary4Bit.h"2627#include "IntArgb.h"2829/*30* This file declares, registers, and defines the various graphics31* primitive loops to manipulate surfaces of type "ByteBinary4Bit".32*33* See also LoopMacros.h34*/3536RegisterFunc RegisterByteBinary4Bit;3738DECLARE_SOLID_FILLRECT(ByteBinary4Bit);39DECLARE_SOLID_FILLSPANS(ByteBinary4Bit);40DECLARE_SOLID_DRAWLINE(ByteBinary4Bit);41DECLARE_XOR_FILLRECT(ByteBinary4Bit);42DECLARE_XOR_FILLSPANS(ByteBinary4Bit);43DECLARE_XOR_DRAWLINE(ByteBinary4Bit);44DECLARE_SOLID_DRAWGLYPHLIST(ByteBinary4Bit);45DECLARE_SOLID_DRAWGLYPHLISTAA(ByteBinary4Bit);46DECLARE_XOR_DRAWGLYPHLIST(ByteBinary4Bit);4748DECLARE_CONVERT_BLIT(ByteBinary4Bit, ByteBinary4Bit);49DECLARE_CONVERT_BLIT(ByteBinary4Bit, IntArgb);50DECLARE_CONVERT_BLIT(IntArgb, ByteBinary4Bit);51DECLARE_XOR_BLIT(IntArgb, ByteBinary4Bit);5253DECLARE_ALPHA_MASKBLIT(ByteBinary4Bit, IntArgb);54DECLARE_ALPHA_MASKBLIT(IntArgb, ByteBinary4Bit);55DECLARE_ALPHA_MASKFILL(ByteBinary4Bit);5657NativePrimitive ByteBinary4BitPrimitives[] = {58REGISTER_SOLID_FILLRECT(ByteBinary4Bit),59REGISTER_SOLID_FILLSPANS(ByteBinary4Bit),60REGISTER_SOLID_LINE_PRIMITIVES(ByteBinary4Bit),61REGISTER_XOR_FILLRECT(ByteBinary4Bit),62REGISTER_XOR_FILLSPANS(ByteBinary4Bit),63REGISTER_XOR_LINE_PRIMITIVES(ByteBinary4Bit),64REGISTER_SOLID_DRAWGLYPHLIST(ByteBinary4Bit),65REGISTER_SOLID_DRAWGLYPHLISTAA(ByteBinary4Bit),66REGISTER_XOR_DRAWGLYPHLIST(ByteBinary4Bit),6768REGISTER_CONVERT_BLIT(ByteBinary4Bit, ByteBinary4Bit),69REGISTER_CONVERT_BLIT(ByteBinary4Bit, IntArgb),70REGISTER_CONVERT_BLIT(IntArgb, ByteBinary4Bit),71REGISTER_XOR_BLIT(IntArgb, ByteBinary4Bit),7273REGISTER_ALPHA_MASKBLIT(ByteBinary4Bit, IntArgb),74REGISTER_ALPHA_MASKBLIT(IntArgb, ByteBinary4Bit),75REGISTER_ALPHA_MASKFILL(ByteBinary4Bit),76};7778jboolean RegisterByteBinary4Bit(JNIEnv *env)79{80return RegisterPrimitives(env, ByteBinary4BitPrimitives,81ArraySize(ByteBinary4BitPrimitives));82}8384DEFINE_BYTE_BINARY_SOLID_FILLRECT(ByteBinary4Bit)8586DEFINE_BYTE_BINARY_SOLID_FILLSPANS(ByteBinary4Bit)8788DEFINE_BYTE_BINARY_SOLID_DRAWLINE(ByteBinary4Bit)8990DEFINE_BYTE_BINARY_XOR_FILLRECT(ByteBinary4Bit)9192DEFINE_BYTE_BINARY_XOR_FILLSPANS(ByteBinary4Bit)9394DEFINE_BYTE_BINARY_XOR_DRAWLINE(ByteBinary4Bit)9596DEFINE_BYTE_BINARY_SOLID_DRAWGLYPHLIST(ByteBinary4Bit)9798DEFINE_BYTE_BINARY_SOLID_DRAWGLYPHLISTAA(ByteBinary4Bit, 3ByteRgb)99100DEFINE_BYTE_BINARY_XOR_DRAWGLYPHLIST(ByteBinary4Bit)101102DEFINE_BYTE_BINARY_CONVERT_BLIT(ByteBinary4Bit, ByteBinary4Bit, 1IntRgb)103104DEFINE_BYTE_BINARY_CONVERT_BLIT(ByteBinary4Bit, IntArgb, 1IntArgb)105106DEFINE_BYTE_BINARY_CONVERT_BLIT(IntArgb, ByteBinary4Bit, 1IntRgb)107108DEFINE_BYTE_BINARY_XOR_BLIT(IntArgb, ByteBinary4Bit)109110DEFINE_BYTE_BINARY_ALPHA_MASKBLIT(ByteBinary4Bit, IntArgb, 4ByteArgb)111112DEFINE_BYTE_BINARY_ALPHA_MASKBLIT(IntArgb, ByteBinary4Bit, 4ByteArgb)113114DEFINE_BYTE_BINARY_ALPHA_MASKFILL(ByteBinary4Bit, 4ByteArgb)115116117