1 | /* |
2 | * Copyright (c) 2000, 2001, 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 |
23 | * questions. |
24 | */ |
25 | |
26 | #include "ByteBinary2Bit.h" |
27 | |
28 | #include "IntArgb.h" |
29 | |
30 | /* |
31 | * This file declares, registers, and defines the various graphics |
32 | * primitive loops to manipulate surfaces of type "ByteBinary2Bit". |
33 | * |
34 | * See also LoopMacros.h |
35 | */ |
36 | |
37 | RegisterFunc RegisterByteBinary2Bit; |
38 | |
39 | DECLARE_SOLID_FILLRECT(ByteBinary2Bit); |
40 | DECLARE_SOLID_FILLSPANS(ByteBinary2Bit); |
41 | DECLARE_SOLID_DRAWLINE(ByteBinary2Bit); |
42 | DECLARE_XOR_FILLRECT(ByteBinary2Bit); |
43 | DECLARE_XOR_FILLSPANS(ByteBinary2Bit); |
44 | DECLARE_XOR_DRAWLINE(ByteBinary2Bit); |
45 | DECLARE_SOLID_DRAWGLYPHLIST(ByteBinary2Bit); |
46 | DECLARE_SOLID_DRAWGLYPHLISTAA(ByteBinary2Bit); |
47 | DECLARE_XOR_DRAWGLYPHLIST(ByteBinary2Bit); |
48 | |
49 | DECLARE_CONVERT_BLIT(ByteBinary2Bit, ByteBinary2Bit); |
50 | DECLARE_CONVERT_BLIT(ByteBinary2Bit, IntArgb); |
51 | DECLARE_CONVERT_BLIT(IntArgb, ByteBinary2Bit); |
52 | DECLARE_XOR_BLIT(IntArgb, ByteBinary2Bit); |
53 | |
54 | DECLARE_ALPHA_MASKBLIT(ByteBinary2Bit, IntArgb); |
55 | DECLARE_ALPHA_MASKBLIT(IntArgb, ByteBinary2Bit); |
56 | DECLARE_ALPHA_MASKFILL(ByteBinary2Bit); |
57 | |
58 | NativePrimitive ByteBinary2BitPrimitives[] = { |
59 | REGISTER_SOLID_FILLRECT(ByteBinary2Bit), |
60 | REGISTER_SOLID_FILLSPANS(ByteBinary2Bit), |
61 | REGISTER_SOLID_LINE_PRIMITIVES(ByteBinary2Bit), |
62 | REGISTER_XOR_FILLRECT(ByteBinary2Bit), |
63 | REGISTER_XOR_FILLSPANS(ByteBinary2Bit), |
64 | REGISTER_XOR_LINE_PRIMITIVES(ByteBinary2Bit), |
65 | REGISTER_SOLID_DRAWGLYPHLIST(ByteBinary2Bit), |
66 | REGISTER_SOLID_DRAWGLYPHLISTAA(ByteBinary2Bit), |
67 | REGISTER_XOR_DRAWGLYPHLIST(ByteBinary2Bit), |
68 | |
69 | REGISTER_CONVERT_BLIT(ByteBinary2Bit, ByteBinary2Bit), |
70 | REGISTER_CONVERT_BLIT(ByteBinary2Bit, IntArgb), |
71 | REGISTER_CONVERT_BLIT(IntArgb, ByteBinary2Bit), |
72 | REGISTER_XOR_BLIT(IntArgb, ByteBinary2Bit), |
73 | |
74 | REGISTER_ALPHA_MASKBLIT(ByteBinary2Bit, IntArgb), |
75 | REGISTER_ALPHA_MASKBLIT(IntArgb, ByteBinary2Bit), |
76 | REGISTER_ALPHA_MASKFILL(ByteBinary2Bit), |
77 | }; |
78 | |
79 | jboolean RegisterByteBinary2Bit(JNIEnv *env) |
80 | { |
81 | return RegisterPrimitives(env, ByteBinary2BitPrimitives, |
82 | ArraySize(ByteBinary2BitPrimitives)); |
83 | } |
84 | |
85 | DEFINE_BYTE_BINARY_SOLID_FILLRECT(ByteBinary2Bit) |
86 | |
87 | DEFINE_BYTE_BINARY_SOLID_FILLSPANS(ByteBinary2Bit) |
88 | |
89 | DEFINE_BYTE_BINARY_SOLID_DRAWLINE(ByteBinary2Bit) |
90 | |
91 | DEFINE_BYTE_BINARY_XOR_FILLRECT(ByteBinary2Bit) |
92 | |
93 | DEFINE_BYTE_BINARY_XOR_FILLSPANS(ByteBinary2Bit) |
94 | |
95 | DEFINE_BYTE_BINARY_XOR_DRAWLINE(ByteBinary2Bit) |
96 | |
97 | DEFINE_BYTE_BINARY_SOLID_DRAWGLYPHLIST(ByteBinary2Bit) |
98 | |
99 | DEFINE_BYTE_BINARY_SOLID_DRAWGLYPHLISTAA(ByteBinary2Bit, 3ByteRgb) |
100 | |
101 | DEFINE_BYTE_BINARY_XOR_DRAWGLYPHLIST(ByteBinary2Bit) |
102 | |
103 | DEFINE_BYTE_BINARY_CONVERT_BLIT(ByteBinary2Bit, ByteBinary2Bit, 1IntRgb) |
104 | |
105 | DEFINE_BYTE_BINARY_CONVERT_BLIT(ByteBinary2Bit, IntArgb, 1IntArgb) |
106 | |
107 | DEFINE_BYTE_BINARY_CONVERT_BLIT(IntArgb, ByteBinary2Bit, 1IntRgb) |
108 | |
109 | DEFINE_BYTE_BINARY_XOR_BLIT(IntArgb, ByteBinary2Bit) |
110 | |
111 | DEFINE_BYTE_BINARY_ALPHA_MASKBLIT(ByteBinary2Bit, IntArgb, 4ByteArgb) |
112 | |
113 | DEFINE_BYTE_BINARY_ALPHA_MASKBLIT(IntArgb, ByteBinary2Bit, 4ByteArgb) |
114 | |
115 | DEFINE_BYTE_BINARY_ALPHA_MASKFILL(ByteBinary2Bit, 4ByteArgb) |
116 | |