1/*
2 * Copyright (c) 2000, 2005, 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#ifndef ByteBinary1Bit_h_Included
27#define ByteBinary1Bit_h_Included
28
29#include "AnyByteBinary.h"
30
31/*
32 * This file contains macro and type definitions used by the macros in
33 * LoopMacros.h to manipulate a surface of type "ByteBinary1Bit".
34 */
35
36typedef jubyte  ByteBinary1BitPixelType;
37typedef jubyte  ByteBinary1BitDataType;
38
39#define ByteBinary1BitPixelStride      0
40#define ByteBinary1BitPixelsPerByte    8
41#define ByteBinary1BitBitsPerPixel     1
42#define ByteBinary1BitMaxBitOffset     7
43#define ByteBinary1BitPixelMask        0x1
44
45#define DeclareByteBinary1BitLoadVars     DeclareByteBinaryLoadVars
46#define DeclareByteBinary1BitStoreVars    DeclareByteBinaryStoreVars
47#define SetByteBinary1BitStoreVarsYPos    SetByteBinaryStoreVarsYPos
48#define SetByteBinary1BitStoreVarsXPos    SetByteBinaryStoreVarsXPos
49#define InitByteBinary1BitLoadVars        InitByteBinaryLoadVars
50#define InitByteBinary1BitStoreVarsY      InitByteBinaryStoreVarsY
51#define InitByteBinary1BitStoreVarsX      InitByteBinaryStoreVarsX
52#define NextByteBinary1BitStoreVarsY      NextByteBinaryStoreVarsY
53#define NextByteBinary1BitStoreVarsX      NextByteBinaryStoreVarsX
54
55#define DeclareByteBinary1BitInitialLoadVars(pRasInfo, pRas, PREFIX, x) \
56    DeclareByteBinaryInitialLoadVars(ByteBinary1Bit, pRasInfo, pRas, PREFIX, x)
57
58#define InitialLoadByteBinary1Bit(pRas, PREFIX) \
59    InitialLoadByteBinary(ByteBinary1Bit, pRas, PREFIX)
60
61#define ShiftBitsByteBinary1Bit(PREFIX) \
62    ShiftBitsByteBinary(ByteBinary1Bit, PREFIX)
63
64#define FinalStoreByteBinary1Bit(pRas, PREFIX) \
65    FinalStoreByteBinary(ByteBinary1Bit, pRas, PREFIX)
66
67#define CurrentPixelByteBinary1Bit(PREFIX) \
68    CurrentPixelByteBinary(ByteBinary1Bit, PREFIX)
69
70
71#define StoreByteBinary1BitPixel(pRas, x, pixel) \
72    StoreByteBinaryPixel(ByteBinary1Bit, pRas, x, pixel)
73
74#define StoreByteBinary1BitPixelData(pPix, x, pixel, PREFIX) \
75    StoreByteBinaryPixelData(ByteBinary1Bit, pPix, x, pixel, PREFIX)
76
77#define ByteBinary1BitPixelFromArgb(pixel, rgb, pRasInfo) \
78    ByteBinaryPixelFromArgb(ByteBinary1Bit, pixel, rgb, pRasInfo)
79
80#define XorByteBinary1BitPixelData(pDst, x, PREFIX, srcpixel, xorpixel, mask)\
81    XorByteBinaryPixelData(ByteBinary1Bit, pDst, x, PREFIX, \
82                           srcpixel, xorpixel, mask)
83
84
85#define LoadByteBinary1BitTo1IntRgb(pRas, PREFIX, x, rgb) \
86    LoadByteBinaryTo1IntRgb(ByteBinary1Bit, pRas, PREFIX, x, rgb)
87
88#define LoadByteBinary1BitTo1IntArgb(pRas, PREFIX, x, argb) \
89    LoadByteBinaryTo1IntArgb(ByteBinary1Bit, pRas, PREFIX, x, argb)
90
91#define LoadByteBinary1BitTo3ByteRgb(pRas, PREFIX, x, r, g, b) \
92    LoadByteBinaryTo3ByteRgb(ByteBinary1Bit, pRas, PREFIX, x, r, g, b)
93
94#define LoadByteBinary1BitTo4ByteArgb(pRas, PREFIX, x, a, r, g, b) \
95    LoadByteBinaryTo4ByteArgb(ByteBinary1Bit, pRas, PREFIX, x, a, r, g, b)
96
97#define StoreByteBinary1BitFrom1IntRgb(pRas, PREFIX, x, rgb) \
98    StoreByteBinaryFrom1IntRgb(ByteBinary1Bit, pRas, PREFIX, x, rgb)
99
100#define StoreByteBinary1BitFrom1IntArgb(pRas, PREFIX, x, argb) \
101    StoreByteBinaryFrom1IntArgb(ByteBinary1Bit, pRas, PREFIX, x, argb)
102
103#define StoreByteBinary1BitFrom3ByteRgb(pRas, PREFIX, x, r, g, b) \
104    StoreByteBinaryFrom3ByteRgb(ByteBinary1Bit, pRas, PREFIX, x, r, g, b)
105
106#define StoreByteBinary1BitFrom4ByteArgb(pRas, PREFIX, x, a, r, g, b) \
107    StoreByteBinaryFrom4ByteArgb(ByteBinary1Bit, pRas, PREFIX, x, a, r, g, b)
108
109
110#define DeclareByteBinary1BitAlphaLoadData(PREFIX) \
111    DeclareByteBinaryAlphaLoadData(ByteBinary1Bit, PREFIX)
112
113#define InitByteBinary1BitAlphaLoadData(PREFIX, pRasInfo) \
114    InitByteBinaryAlphaLoadData(ByteBinary1Bit, PREFIX, pRasInfo)
115
116#define LoadAlphaFromByteBinary1BitFor4ByteArgb(pRas, PREFIX, COMP_PREFIX) \
117    LoadAlphaFromByteBinaryFor4ByteArgb(ByteBinary1Bit, pRas, PREFIX, \
118                                        COMP_PREFIX)
119
120#define Postload4ByteArgbFromByteBinary1Bit(pRas, PREFIX, COMP_PREFIX) \
121    Postload4ByteArgbFromByteBinary(ByteBinary1Bit, pRas, PREFIX, COMP_PREFIX)
122
123
124#define ByteBinary1BitIsPremultiplied    ByteBinaryIsPremultiplied
125
126#define StoreByteBinary1BitFrom4ByteArgbComps(pRas, PREFIX, x, COMP_PREFIX) \
127    StoreByteBinaryFrom4ByteArgbComps(ByteBinary1Bit, pRas, \
128                                      PREFIX, x, COMP_PREFIX)
129
130#endif /* ByteBinary1Bit_h_Included */
131