Beispiel #1
0
#include "ByteGray.h"
#include "ByteIndexed.h"

/*
 * This file declares, registers, and defines the various graphics
 * primitive loops to manipulate surfaces of type "Ushort4444Argb".
 *
 * See also LoopMacros.h
 */

RegisterFunc RegisterUshort4444Argb;

DECLARE_SRCOVER_MASKBLIT(IntArgb, Ushort4444Argb);

NativePrimitive Ushort4444ArgbPrimitives[] = {
    REGISTER_ANYSHORT_ISOCOPY_BLIT(Ushort4444Argb),
    REGISTER_SRCOVER_MASKBLIT(IntArgb, Ushort4444Argb),
};

jboolean RegisterUshort4444Argb(JNIEnv *env)
{
    return RegisterPrimitives(env, Ushort4444ArgbPrimitives,
			      ArraySize(Ushort4444ArgbPrimitives));
}

jint PixelForUshort4444Argb(SurfaceDataRasInfo *pRasInfo, jint rgb)
{
    return IntArgbToUshort4444Argb(rgb);
}

DEFINE_SRCOVER_MASKBLIT(IntArgb, Ushort4444Argb, 4ByteArgb)
DECLARE_CONVERT_BLIT(ByteGray, Ushort555Rgbx);
DECLARE_CONVERT_BLIT(ByteIndexed, Ushort555Rgbx);
DECLARE_SCALE_BLIT(Ushort555Rgbx, IntArgb);
DECLARE_SCALE_BLIT(IntArgb, Ushort555Rgbx);
DECLARE_SCALE_BLIT(ThreeByteBgr, Ushort555Rgbx);
DECLARE_SCALE_BLIT(ByteGray, Ushort555Rgbx);
DECLARE_SCALE_BLIT(ByteIndexed, Ushort555Rgbx);
DECLARE_XPAR_CONVERT_BLIT(ByteIndexedBm, Ushort555Rgbx);
DECLARE_XPAR_SCALE_BLIT(ByteIndexedBm, Ushort555Rgbx);
DECLARE_XPAR_SCALE_BLIT(IntArgbBm, Ushort555Rgbx);
DECLARE_XPAR_BLITBG(ByteIndexedBm, Ushort555Rgbx);
DECLARE_XOR_BLIT(IntArgb, Ushort555Rgbx);
DECLARE_SOLID_DRAWGLYPHLISTAA(Ushort555Rgbx); 

NativePrimitive Ushort555RgbxPrimitives[] = {
    REGISTER_ANYSHORT_ISOCOPY_BLIT(Ushort555Rgbx),
    REGISTER_ANYSHORT_ISOSCALE_BLIT(Ushort555Rgbx),
    REGISTER_ANYSHORT_ISOXOR_BLIT(Ushort555Rgbx),
    REGISTER_CONVERT_BLIT(Ushort555Rgbx, IntArgb),
    REGISTER_CONVERT_BLIT(IntArgb, Ushort555Rgbx),
    REGISTER_CONVERT_BLIT_EQUIV(IntRgb, Ushort555Rgbx,
				NAME_CONVERT_BLIT(IntArgb, Ushort555Rgbx)),
    REGISTER_CONVERT_BLIT(ThreeByteBgr, Ushort555Rgbx),
    REGISTER_CONVERT_BLIT(ByteGray, Ushort555Rgbx),
    REGISTER_CONVERT_BLIT(ByteIndexed, Ushort555Rgbx),
    REGISTER_SCALE_BLIT(Ushort555Rgbx, IntArgb),
    REGISTER_SCALE_BLIT(IntArgb, Ushort555Rgbx),
    REGISTER_SCALE_BLIT_EQUIV(IntRgb, Ushort555Rgbx,
			      NAME_SCALE_BLIT(IntArgb, Ushort555Rgbx)),
    REGISTER_SCALE_BLIT(ThreeByteBgr, Ushort555Rgbx),
    REGISTER_SCALE_BLIT(ByteGray, Ushort555Rgbx),