00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef RU_COMPOSITE_H
00021 #define RU_COMPOSITE_H
00022
00023 #include "RU_API.h"
00024 enum RU_CompositeType
00025 {
00026 RU_COMP_OVER = 0,
00027 RU_COMP_UNDER = 1,
00028 RU_COMP_ATOP = 2,
00029 RU_COMP_INSIDE = 3,
00030 RU_COMP_OUTSIDE = 4,
00031 RU_COMP_SCREEN = 5,
00032 RU_COMP_ADD = 6,
00033 RU_COMP_SUBTRACT = 7,
00034 RU_COMP_DIFF = 8,
00035 RU_COMP_MULTIPLY = 9,
00036 RU_COMP_MIN = 10,
00037 RU_COMP_MAX = 11,
00038 RU_COMP_AVERAGE = 12,
00039 RU_COMP_XOR = 13,
00040 RU_COMP_SUBTRACT2 = 14
00041 };
00042
00043
00044 class RU_API RU_Composite
00045 {
00046 public:
00047 static void composite(RU_CompositeType op, int xsize, int ysize,
00048 float *bcolor, const float *balpha,
00049 const float *fcolor, const float *falpha);
00050
00051 static void composite(RU_CompositeType op, int xsize, int ysize,
00052 unsigned char *bcolor, const unsigned char *balpha,
00053 const unsigned char *fcolor,
00054 const unsigned char *falpha);
00055 static void composite(RU_CompositeType op, int xsize, int ysize,
00056 unsigned char *bcolor, const unsigned short *balpha,
00057 const unsigned char *fcolor,
00058 const unsigned short *falpha);
00059 static void composite(RU_CompositeType op, int xsize, int ysize,
00060 unsigned char *bcolor, const float *balpha,
00061 const unsigned char *fcolor,
00062 const float *falpha);
00063
00064 static void composite(RU_CompositeType op, int xsize, int ysize,
00065 unsigned short *bcolor, const unsigned short *balpha,
00066 const unsigned short *fcolor,
00067 const unsigned short *falpha);
00068 static void composite(RU_CompositeType op, int xsize, int ysize,
00069 unsigned short *bcolor, const unsigned char *balpha,
00070 const unsigned short *fcolor,
00071 const unsigned char *falpha);
00072 static void composite(RU_CompositeType op, int xsize, int ysize,
00073 unsigned short *bcolor, const float *balpha,
00074 const unsigned short *fcolor,
00075 const float *falpha);
00076
00077 static void composite(RU_CompositeType op, int xsize, int ysize,
00078 float *bcolor, const unsigned short *balpha,
00079 const float *fcolor,
00080 const unsigned short *falpha);
00081 static void composite(RU_CompositeType op, int xsize, int ysize,
00082 float *bcolor, const unsigned char *balpha,
00083 const float *fcolor,
00084 const unsigned char *falpha);
00085
00086 static void compositeGeo(RU_CompositeType op, int xsize, int ysize,
00087 float *bcolor, const float *balpha,
00088 const float *fcolor, const float *falpha,
00089 const float *fore[4]);
00090
00091 static void compositeAlpha(RU_CompositeType op, int xsize, int ysize,
00092 float *balpha, const float *falpha);
00093 static void compositeAlpha(RU_CompositeType op, int xsize, int ysize,
00094 unsigned char *balpha,
00095 const unsigned char *falpha);
00096 static void compositeAlpha(RU_CompositeType op, int xsize, int ysize,
00097 unsigned short *balpha,
00098 const unsigned short *falpha);
00099 };
00100
00101
00102 #endif