0N/A/*
2362N/A * Copyright (c) 2000, 2008, Oracle and/or its affiliates. All rights reserved.
0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
0N/A *
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 *
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 *
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.
0N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
0N/A */
0N/A
0N/A#ifndef IntRgbx_h_Included
0N/A#define IntRgbx_h_Included
0N/A
0N/A#include "IntDcm.h"
0N/A
0N/A/*
0N/A * This file contains macro and type definitions used by the macros in
0N/A * LoopMacros.h to manipulate a surface of type "IntRgbx".
0N/A */
0N/A
0N/Atypedef jint IntRgbxPixelType;
0N/Atypedef jint IntRgbxDataType;
0N/A
300N/A#define IntRgbxIsOpaque 1
300N/A
0N/A#define IntRgbxPixelStride 4
0N/A
0N/A#define DeclareIntRgbxLoadVars(PREFIX)
0N/A#define DeclareIntRgbxStoreVars(PREFIX)
0N/A#define SetIntRgbxStoreVarsYPos(PREFIX, pRasInfo, y)
0N/A#define SetIntRgbxStoreVarsXPos(PREFIX, pRasInfo, x)
0N/A#define InitIntRgbxLoadVars(PREFIX, pRasInfo)
0N/A#define InitIntRgbxStoreVarsY(PREFIX, pRasInfo)
0N/A#define InitIntRgbxStoreVarsX(PREFIX, pRasInfo)
0N/A#define NextIntRgbxStoreVarsX(PREFIX)
0N/A#define NextIntRgbxStoreVarsY(PREFIX)
0N/A
0N/A#define IntRgbxXparLutEntry 1
0N/A#define IntRgbxIsXparLutEntry(pix) ((pix & 1) != 0)
0N/A#define StoreIntRgbxNonXparFromArgb StoreIntRgbxFromArgb
0N/A
0N/A
0N/A#define IntRgbxPixelFromArgb(pixel, rgb, pRasInfo) \
0N/A (pixel) = (rgb << 8)
0N/A
0N/A#define StoreIntRgbxPixel(pRas, x, pixel) \
0N/A (pRas)[x] = (pixel)
0N/A
0N/A#define DeclareIntRgbxPixelData(PREFIX)
0N/A
0N/A#define ExtractIntRgbxPixelData(PIXEL, PREFIX)
0N/A
0N/A#define StoreIntRgbxPixelData(pPix, x, pixel, PREFIX) \
0N/A (pPix)[x] = (pixel)
0N/A
0N/A
0N/A#define LoadIntRgbxTo1IntRgb(pRas, PREFIX, x, rgb) \
0N/A (rgb) = ((pRas)[x] >> 8)
0N/A
0N/A#define LoadIntRgbxTo1IntArgb(pRas, PREFIX, x, argb) \
0N/A (argb) = 0xff000000 | ((pRas)[x] >> 8)
0N/A
0N/A#define LoadIntRgbxTo3ByteRgb(pRas, PREFIX, x, r, g, b) \
0N/A do { \
0N/A jint pixel = (pRas)[x]; \
0N/A ExtractIntDcmComponents123X(pixel, r, g, b); \
0N/A } while (0)
0N/A
0N/A#define LoadIntRgbxTo4ByteArgb(pRas, PREFIX, x, a, r, g, b) \
0N/A do { \
0N/A LoadIntRgbxTo3ByteRgb(pRas, PREFIX, x, r, g, b); \
0N/A (a) = 0xff; \
0N/A } while (0)
0N/A
0N/A#define StoreIntRgbxFrom1IntRgb(pRas, PREFIX, x, rgb) \
0N/A (pRas)[x] = ((rgb) << 8)
0N/A
0N/A#define StoreIntRgbxFrom1IntArgb(pRas, PREFIX, x, argb) \
0N/A (pRas)[x] = ((argb) << 8)
0N/A
0N/A#define StoreIntRgbxFrom3ByteRgb(pRas, PREFIX, x, r, g, b) \
0N/A (pRas)[x] = ComposeIntDcmComponents123X(r, g, b)
0N/A
0N/A#define StoreIntRgbxFrom4ByteArgb(pRas, PREFIX, x, a, r, g, b) \
0N/A StoreIntRgbxFrom3ByteRgb(pRas, PREFIX, x, r, g, b)
0N/A
0N/A#define CopyIntRgbxToIntArgbPre(pRGB, i, PREFIX, pRow, x) \
0N/A (pRGB)[i] = (((pRow)[x] >> 8) | 0xff000000)
0N/A
0N/A
0N/A#define DeclareIntRgbxAlphaLoadData(PREFIX)
0N/A
0N/A#define InitIntRgbxAlphaLoadData(PREFIX, pRasInfo)
0N/A
0N/A#define LoadAlphaFromIntRgbxFor4ByteArgb(pRas, PREFIX, COMP_PREFIX) \
0N/A COMP_PREFIX ## A = 0xff
0N/A
0N/A#define Postload4ByteArgbFromIntRgbx(pRas, PREFIX, COMP_PREFIX) \
0N/A LoadIntRgbxTo3ByteRgb(pRas, PREFIX, 0, COMP_PREFIX ## R, \
0N/A COMP_PREFIX ## G, COMP_PREFIX ## B)
0N/A
0N/A#define StoreIntRgbxFrom4ByteArgbComps(pRas, PREFIX, x, COMP_PREFIX) \
0N/A StoreIntRgbxFrom4ByteArgb(pRas, PREFIX, x, \
0N/A COMP_PREFIX ## A, COMP_PREFIX ## R, \
0N/A COMP_PREFIX ## G, COMP_PREFIX ## B)
0N/A
0N/A#define IntRgbxIsPremultiplied 0
0N/A
0N/A#define DeclareIntRgbxBlendFillVars(PREFIX)
0N/A
0N/A#define ClearIntRgbxBlendFillVars(PREFIX, argb) \
0N/A argb = 0
0N/A
0N/A#define InitIntRgbxBlendFillVarsNonPre(PREFIX, argb, COMP_PREFIX)
0N/A
0N/A#define InitIntRgbxBlendFillVarsPre(PREFIX, argb, COMP_PREFIX)
0N/A
0N/A#define StoreIntRgbxBlendFill(pRas, PREFIX, x, argb, COMP_PREFIX) \
0N/A (pRas)[x] = (argb << 8)
0N/A
0N/A#endif /* IntRgbx_h_Included */