filters
SFont.cc00001
00002
00003
00004
00005
00006
00007
00008
00009 #include <aconf.h>
00010
00011 #ifdef USE_GCC_PRAGMAS
00012 #pragma implementation
00013 #endif
00014
00015 #include "SFont.h"
00016
00017
00018
00019 SFontEngine::SFontEngine(Display *displayA, Visual *visualA, int depthA,
00020 Colormap colormapA) {
00021 display = displayA;
00022 visual = visualA;
00023 depth = depthA;
00024 colormap = colormapA;
00025 }
00026
00027 SFontEngine::~SFontEngine() {
00028 }
00029
00030 void SFontEngine::useTrueColor(int rMaxA, int rShiftA, int gMaxA, int gShiftA,
00031 int bMaxA, int bShiftA) {
00032 trueColor = gTrue;
00033 rMax = rMaxA;
00034 rShift = rShiftA;
00035 gMax = gMaxA;
00036 gShift = gShiftA;
00037 bMax = bMaxA;
00038 bShift = bShiftA;
00039 }
00040
00041 void SFontEngine::useColorCube(Gulong *colorsA, int nRGBA) {
00042 trueColor = gFalse;
00043 colors = colorsA;
00044 nRGB = nRGBA;
00045 rMax = gMax = bMax = nRGB - 1;
00046 }
00047
00048 Gulong SFontEngine::findColor(int r, int g, int b) {
00049 int r1, g1, b1;
00050 Gulong pix;
00051
00052 r1 = ((r & 0xffff) * rMax) / 0xffff;
00053 g1 = ((g & 0xffff) * gMax) / 0xffff;
00054 b1 = ((b & 0xffff) * bMax) / 0xffff;
00055 if (trueColor) {
00056 pix = (r1 << rShift) + (g1 << gShift) + (b1 << bShift);
00057 } else {
00058 pix = colors[(r1 * nRGB + g1) * nRGB + b1];
00059 }
00060 return pix;
00061 }
00062
00063
00064
00065 SFontFile::SFontFile() {
00066 }
00067
00068 SFontFile::~SFontFile() {
00069 }
00070
00071
00072
00073 SFont::SFont() {
00074 }
00075
00076 SFont::~SFont() {
00077 }
00078
00079 GBool SFont::getCharPath(CharCode c, Unicode u, GfxState *state) {
00080 return gFalse;
00081 }
|