Commit 51670972 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

Last xpdf 3.01 merge (at least from my side)

It's very big, but noone has opposed in the 2 weeks time i gave on the ml so either poppler is dead or people agree with the patch
parent 10dfa225
2005-10-30 Albert Astals Cid <aacid@kde.org>
* glib/poppler-page.cc
* poppler/ArthurOutputDev.cc
* poppler/ArthurOutputDev.h
* poppler/CairoOutputDev.cc
* poppler/CairoOutputDev.h
* poppler/Gfx.cc
* poppler/Gfx.h
* poppler/GfxState.cc
* poppler/GfxState.h
* poppler/OutputDev.cc
* poppler/OutputDev.h
* poppler/PDFDoc.cc
* poppler/PDFDoc.h
* poppler/PSOutputDev.cc
* poppler/PSOutputDev.h
* poppler/Page.cc
* poppler/Page.h
* poppler/SplashOutputDev.cc
* poppler/SplashOutputDev.h
* poppler/TextOutputDev.cc
* poppler/TextOutputDev.h
* qt/poppler-page.cc
* qt4/src/poppler-page.cc
* splash/Splash.cc
* splash/Splash.h
* splash/SplashBitmap.cc
* splash/SplashBitmap.h
* splash/SplashPattern.cc
* splash/SplashPattern.h
* splash/SplashState.cc
* splash/SplashState.h
* splash/SplashTypes.h
* test/gtk-cairo-test.cc
* test/gtk-splash-test.cc
* test/pdf-inspector.cc: Last xpdf 3.01 merges
2005-10-16 Kristian Høgsberg <krh@redhat.com> 2005-10-16 Kristian Høgsberg <krh@redhat.com>
* poppler/poppler-config.h.in (GCC_PRINTF_FORMAT): Remove evil * poppler/poppler-config.h.in (GCC_PRINTF_FORMAT): Remove evil
......
...@@ -85,11 +85,11 @@ poppler_page_get_size (PopplerPage *page, ...@@ -85,11 +85,11 @@ poppler_page_get_size (PopplerPage *page,
rotate = page->page->getRotate (); rotate = page->page->getRotate ();
if (rotate == 90 || rotate == 270) { if (rotate == 90 || rotate == 270) {
page_height = page->page->getWidth (); page_height = page->page->getCropWidth ();
page_width = page->page->getHeight (); page_width = page->page->getCropHeight ();
} else { } else {
page_width = page->page->getWidth (); page_width = page->page->getCropWidth ();
page_height = page->page->getHeight (); page_height = page->page->getCropHeight ();
} }
if (width != NULL) if (width != NULL)
...@@ -129,11 +129,11 @@ poppler_page_prepare_output_dev (PopplerPage *page, ...@@ -129,11 +129,11 @@ poppler_page_prepare_output_dev (PopplerPage *page,
rotate = (rotation + page->page->getRotate()) % 360; rotate = (rotation + page->page->getRotate()) % 360;
if (rotate == 90 || rotate == 270) { if (rotate == 90 || rotate == 270) {
cairo_width = MAX ((int)(page->page->getHeight() * scale + 0.5), 1); cairo_width = MAX ((int)(page->page->getCropHeight() * scale + 0.5), 1);
cairo_height = MAX ((int)(page->page->getWidth() * scale + 0.5), 1); cairo_height = MAX ((int)(page->page->getCropWidth() * scale + 0.5), 1);
} else { } else {
cairo_width = MAX ((int)(page->page->getWidth() * scale + 0.5), 1); cairo_width = MAX ((int)(page->page->getCropWidth() * scale + 0.5), 1);
cairo_height = MAX ((int)(page->page->getHeight() * scale + 0.5), 1); cairo_height = MAX ((int)(page->page->getCropHeight() * scale + 0.5), 1);
} }
output_dev = page->document->output_dev; output_dev = page->document->output_dev;
...@@ -301,6 +301,7 @@ poppler_page_render_to_pixbuf (PopplerPage *page, ...@@ -301,6 +301,7 @@ poppler_page_render_to_pixbuf (PopplerPage *page,
page->page->displaySlice(page->document->output_dev, page->page->displaySlice(page->document->output_dev,
72.0 * scale, 72.0 * scale, 72.0 * scale, 72.0 * scale,
rotation, rotation,
gFalse, /* useMediaBox */
gTrue, /* Crop */ gTrue, /* Crop */
src_x, src_y, src_x, src_y,
src_width, src_height, src_width, src_height,
...@@ -318,6 +319,7 @@ poppler_page_get_text_output_dev (PopplerPage *page) ...@@ -318,6 +319,7 @@ poppler_page_get_text_output_dev (PopplerPage *page)
page->gfx = page->page->createGfx(page->text_dev, page->gfx = page->page->createGfx(page->text_dev,
72.0, 72.0, 0, 72.0, 72.0, 0,
gFalse, /* useMediaBox */
gTrue, /* Crop */ gTrue, /* Crop */
-1, -1, -1, -1, -1, -1, -1, -1,
NULL, /* links */ NULL, /* links */
...@@ -642,15 +644,17 @@ poppler_page_find_text (PopplerPage *page, ...@@ -642,15 +644,17 @@ poppler_page_find_text (PopplerPage *page,
doc = page->document->doc; doc = page->document->doc;
poppler_page_get_size (page, NULL, &height); poppler_page_get_size (page, NULL, &height);
page->page->display (output_dev, 72, 72, 0, page->page->display (output_dev, 72, 72, 0, gFalse,
gTrue, NULL, doc->getCatalog()); gTrue, NULL, doc->getCatalog());
matches = NULL; matches = NULL;
xMin = 0; xMin = 0;
yMin = 0; yMin = 0;
#warning you probably want to add caseSensitive and backwards as parameters
while (output_dev->findText (ucs4, ucs4_len, while (output_dev->findText (ucs4, ucs4_len,
gFalse, gTrue, // startAtTop, stopAtBottom gFalse, gTrue, // startAtTop, stopAtBottom
gTrue, gFalse, // startAtLast, stopAtLast gTrue, gFalse, // startAtLast, stopAtLast
gFalse, gFalse, // caseSensitive, backwards
&xMin, &yMin, &xMax, &yMax)) &xMin, &yMin, &xMax, &yMax))
{ {
match = g_new (PopplerRectangle, 1); match = g_new (PopplerRectangle, 1);
...@@ -693,7 +697,7 @@ poppler_page_render_to_ps (PopplerPage *page, ...@@ -693,7 +697,7 @@ poppler_page_render_to_ps (PopplerPage *page,
ps_file->document->doc->displayPage (ps_file->out, page->index + 1, 72.0, 72.0, ps_file->document->doc->displayPage (ps_file->out, page->index + 1, 72.0, 72.0,
0, gTrue, gFalse); 0, gFalse, gTrue, gFalse);
} }
static void static void
...@@ -780,10 +784,10 @@ poppler_page_get_link_mapping (PopplerPage *page) ...@@ -780,10 +784,10 @@ poppler_page_get_link_mapping (PopplerPage *page)
link->getRect (&(mapping->area.x1), &(mapping->area.y1), link->getRect (&(mapping->area.x1), &(mapping->area.y1),
&(mapping->area.x2), &(mapping->area.y2)); &(mapping->area.x2), &(mapping->area.y2));
mapping->area.x1 -= page->page->getBox()->x1; mapping->area.x1 -= page->page->getCropBox()->x1;
mapping->area.x2 -= page->page->getBox()->x1; mapping->area.x2 -= page->page->getCropBox()->x1;
mapping->area.y1 -= page->page->getBox()->y1; mapping->area.y1 -= page->page->getCropBox()->y1;
mapping->area.y2 -= page->page->getBox()->y1; mapping->area.y2 -= page->page->getCropBox()->y1;
map_list = g_list_prepend (map_list, mapping); map_list = g_list_prepend (map_list, mapping);
} }
......
...@@ -485,7 +485,7 @@ void ArthurOutputDev::eoClip(GfxState *state) ...@@ -485,7 +485,7 @@ void ArthurOutputDev::eoClip(GfxState *state)
void ArthurOutputDev::drawChar(GfxState *state, double x, double y, void ArthurOutputDev::drawChar(GfxState *state, double x, double y,
double dx, double dy, double dx, double dy,
double originX, double originY, double originX, double originY,
CharCode code, Unicode *u, int uLen) { CharCode code, int nBytes, Unicode *u, int uLen) {
double x1, y1; double x1, y1;
// SplashPath *path; // SplashPath *path;
int render; int render;
......
...@@ -102,7 +102,7 @@ public: ...@@ -102,7 +102,7 @@ public:
virtual void drawChar(GfxState *state, double x, double y, virtual void drawChar(GfxState *state, double x, double y,
double dx, double dy, double dx, double dy,
double originX, double originY, double originX, double originY,
CharCode code, Unicode *u, int uLen); CharCode code, int nBytes, Unicode *u, int uLen);
virtual GBool beginType3Char(GfxState *state, double x, double y, virtual GBool beginType3Char(GfxState *state, double x, double y,
double dx, double dy, double dx, double dy,
CharCode code, Unicode *u, int uLen); CharCode code, Unicode *u, int uLen);
......
...@@ -348,7 +348,7 @@ void CairoOutputDev::beginString(GfxState *state, GooString *s) ...@@ -348,7 +348,7 @@ void CairoOutputDev::beginString(GfxState *state, GooString *s)
void CairoOutputDev::drawChar(GfxState *state, double x, double y, void CairoOutputDev::drawChar(GfxState *state, double x, double y,
double dx, double dy, double dx, double dy,
double originX, double originY, double originX, double originY,
CharCode code, Unicode *u, int uLen) CharCode code, int nBytes, Unicode *u, int uLen)
{ {
double tx, ty; double tx, ty;
......
...@@ -102,7 +102,7 @@ public: ...@@ -102,7 +102,7 @@ public:
void drawChar(GfxState *state, double x, double y, void drawChar(GfxState *state, double x, double y,
double dx, double dy, double dx, double dy,
double originX, double originY, double originX, double originY,
CharCode code, Unicode *u, int uLen); CharCode code, int nBytes, Unicode *u, int uLen);
virtual GBool beginType3Char(GfxState *state, double x, double y, virtual GBool beginType3Char(GfxState *state, double x, double y,
double dx, double dy, double dx, double dy,
......
This diff is collapsed.
...@@ -32,6 +32,9 @@ class GfxShading; ...@@ -32,6 +32,9 @@ class GfxShading;
class GfxFunctionShading; class GfxFunctionShading;
class GfxAxialShading; class GfxAxialShading;
class GfxRadialShading; class GfxRadialShading;
class GfxGouraudTriangleShading;
class GfxPatchMeshShading;
struct GfxPatch;
class GfxState; class GfxState;
struct GfxColor; struct GfxColor;
class Gfx; class Gfx;
...@@ -100,14 +103,14 @@ public: ...@@ -100,14 +103,14 @@ public:
// Constructor for regular output. // Constructor for regular output.
Gfx(XRef *xrefA, OutputDev *outA, int pageNum, Dict *resDict, Gfx(XRef *xrefA, OutputDev *outA, int pageNum, Dict *resDict,
double hDPI, double vDPI, PDFRectangle *box, GBool crop, double hDPI, double vDPI, PDFRectangle *box,
PDFRectangle *cropBox, int rotate, PDFRectangle *cropBox, int rotate,
GBool (*abortCheckCbkA)(void *data) = NULL, GBool (*abortCheckCbkA)(void *data) = NULL,
void *abortCheckCbkDataA = NULL); void *abortCheckCbkDataA = NULL);
// Constructor for a sub-page object. // Constructor for a sub-page object.
Gfx(XRef *xrefA, OutputDev *outA, Dict *resDict, Gfx(XRef *xrefA, OutputDev *outA, Dict *resDict,
PDFRectangle *box, GBool crop, PDFRectangle *cropBox, PDFRectangle *box, PDFRectangle *cropBox,
GBool (*abortCheckCbkA)(void *data) = NULL, GBool (*abortCheckCbkA)(void *data) = NULL,
void *abortCheckCbkDataA = NULL); void *abortCheckCbkDataA = NULL);
...@@ -127,6 +130,9 @@ public: ...@@ -127,6 +130,9 @@ public:
// Restore graphics state. // Restore graphics state.
void restoreState(); void restoreState();
// Get the current graphics state object.
GfxState *getState() { return state; }
private: private:
XRef *xref; // the xref table for this PDF file XRef *xref; // the xref table for this PDF file
...@@ -216,6 +222,13 @@ private: ...@@ -216,6 +222,13 @@ private:
GfxColor *colors, int depth); GfxColor *colors, int depth);
void doAxialShFill(GfxAxialShading *shading); void doAxialShFill(GfxAxialShading *shading);
void doRadialShFill(GfxRadialShading *shading); void doRadialShFill(GfxRadialShading *shading);
void doGouraudTriangleShFill(GfxGouraudTriangleShading *shading);
void gouraudFillTriangle(double x0, double y0, GfxColor *color0,
double x1, double y1, GfxColor *color1,
double x2, double y2, GfxColor *color2,
int nComps, int depth);
void doPatchMeshShFill(GfxPatchMeshShading *shading);
void fillPatch(GfxPatch *patch, int nComps, int depth);
void doEndPath(); void doEndPath();
// path clipping operators // path clipping operators
......
This diff is collapsed.
...@@ -30,6 +30,58 @@ public: ...@@ -30,6 +30,58 @@ public:
void transform(double x, double y, double *tx, double *ty); void transform(double x, double y, double *tx, double *ty);
}; };
//------------------------------------------------------------------------
// GfxBlendMode
//------------------------------------------------------------------------
enum GfxBlendMode {
gfxBlendNormal,
gfxBlendMultiply,
gfxBlendScreen,
gfxBlendOverlay,
gfxBlendDarken,
gfxBlendLighten,
gfxBlendColorDodge,
gfxBlendColorBurn,
gfxBlendHardLight,
gfxBlendSoftLight,
gfxBlendDifference,
gfxBlendExclusion,
gfxBlendHue,
gfxBlendSaturation,
gfxBlendColor,
gfxBlendLuminosity
};
//------------------------------------------------------------------------
// GfxColorComp
//------------------------------------------------------------------------
// 16.16 fixed point color component
typedef int GfxColorComp;
#define gfxColorComp1 0x10000
static inline GfxColorComp dblToCol(double x) {
return (GfxColorComp)(x * gfxColorComp1);
}
static inline double colToDbl(GfxColorComp x) {
return (double)x / (double)gfxColorComp1;
}
static inline GfxColorComp byteToCol(Guchar x) {
// (x / 255) << 16 = (0.0000000100000001... * x) << 16
// = ((x << 8) + (x) + (x >> 8) + ...) << 16
// = (x << 8) + (x) + (x >> 7)
// [for rounding]
return (GfxColorComp)((x << 8) + x + (x >> 7));
}
static inline Guchar colToByte(GfxColorComp x) {
// 255 * x + 0.5 = 256 * x - x + 0x8000
return (Guchar)(((x << 8) - x + 0x8000) >> 16);
}
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// GfxColor // GfxColor
...@@ -38,15 +90,21 @@ public: ...@@ -38,15 +90,21 @@ public:
#define gfxColorMaxComps funcMaxOutputs #define gfxColorMaxComps funcMaxOutputs
struct GfxColor { struct GfxColor {
double c[gfxColorMaxComps]; GfxColorComp c[gfxColorMaxComps];
}; };
//------------------------------------------------------------------------
// GfxGray
//------------------------------------------------------------------------
typedef GfxColorComp GfxGray;
//------------------------------------------------------------------------ //------------------------------------------------------------------------
// GfxRGB // GfxRGB
//------------------------------------------------------------------------ //------------------------------------------------------------------------
struct GfxRGB { struct GfxRGB {
double r, g, b; GfxColorComp r, g, b;
}; };
//------------------------------------------------------------------------ //------------------------------------------------------------------------
...@@ -54,7 +112,7 @@ struct GfxRGB { ...@@ -54,7 +112,7 @@ struct GfxRGB {
//------------------------------------------------------------------------ //------------------------------------------------------------------------
struct GfxCMYK { struct GfxCMYK {
double c, m, y, k; GfxColorComp c, m, y, k;
}; };
//------------------------------------------------------------------------ //------------------------------------------------------------------------
...@@ -89,7 +147,7 @@ public: ...@@ -89,7 +147,7 @@ public:
static GfxColorSpace *parse(Object *csObj); static GfxColorSpace *parse(Object *csObj);
// Convert to gray, RGB, or CMYK. // Convert to gray, RGB, or CMYK.
virtual void getGray(GfxColor *color, double *gray) = 0; virtual void getGray(GfxColor *color, GfxGray *gray) = 0;
virtual void getRGB(GfxColor *color, GfxRGB *rgb) = 0; virtual void getRGB(GfxColor *color, GfxRGB *rgb) = 0;
virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk) = 0; virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk) = 0;
virtual void getRGBLine(Guchar *in, unsigned int *out, int length); virtual void getRGBLine(Guchar *in, unsigned int *out, int length);
...@@ -123,7 +181,7 @@ public: ...@@ -123,7 +181,7 @@ public:
virtual GfxColorSpace *copy(); virtual GfxColorSpace *copy();
virtual GfxColorSpaceMode getMode() { return csDeviceGray; } virtual GfxColorSpaceMode getMode() { return csDeviceGray; }
virtual void getGray(GfxColor *color, double *gray); virtual void getGray(GfxColor *color, GfxGray *gray);
virtual void getRGB(GfxColor *color, GfxRGB *rgb); virtual void getRGB(GfxColor *color, GfxRGB *rgb);
virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk); virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
virtual void getGrayLine(Guchar *in, Guchar *out, int length); virtual void getGrayLine(Guchar *in, Guchar *out, int length);
...@@ -149,7 +207,7 @@ public: ...@@ -149,7 +207,7 @@ public:
// Construct a CalGray color space. Returns NULL if unsuccessful. // Construct a CalGray color space. Returns NULL if unsuccessful.
static GfxColorSpace *parse(Array *arr); static GfxColorSpace *parse(Array *arr);
virtual void getGray(GfxColor *color, double *gray); virtual void getGray(GfxColor *color, GfxGray *gray);
virtual void getRGB(GfxColor *color, GfxRGB *rgb); virtual void getRGB(GfxColor *color, GfxRGB *rgb);
virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk); virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
virtual void getGrayLine(Guchar *in, Guchar *out, int length); virtual void getGrayLine(Guchar *in, Guchar *out, int length);
...@@ -185,7 +243,7 @@ public: ...@@ -185,7 +243,7 @@ public:
virtual GfxColorSpace *copy(); virtual GfxColorSpace *copy();
virtual GfxColorSpaceMode getMode() { return csDeviceRGB; } virtual GfxColorSpaceMode getMode() { return csDeviceRGB; }
virtual void getGray(GfxColor *color, double *gray); virtual void getGray(GfxColor *color, GfxGray *gray);
virtual void getRGB(GfxColor *color, GfxRGB *rgb); virtual void getRGB(GfxColor *color, GfxRGB *rgb);
virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk); virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
virtual void getGrayLine(Guchar *in, Guchar *out, int length); virtual void getGrayLine(Guchar *in, Guchar *out, int length);
...@@ -211,7 +269,7 @@ public: ...@@ -211,7 +269,7 @@ public:
// Construct a CalRGB color space. Returns NULL if unsuccessful. // Construct a CalRGB color space. Returns NULL if unsuccessful.
static GfxColorSpace *parse(Array *arr); static GfxColorSpace *parse(Array *arr);
virtual void getGray(GfxColor *color, double *gray); virtual void getGray(GfxColor *color, GfxGray *gray);
virtual void getRGB(GfxColor *color, GfxRGB *rgb); virtual void getRGB(GfxColor *color, GfxRGB *rgb);
virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk); virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
virtual void getGrayLine(Guchar *in, Guchar *out, int length); virtual void getGrayLine(Guchar *in, Guchar *out, int length);
...@@ -251,7 +309,7 @@ public: ...@@ -251,7 +309,7 @@ public:
virtual GfxColorSpace *copy(); virtual GfxColorSpace *copy();
virtual GfxColorSpaceMode getMode() { return csDeviceCMYK; } virtual GfxColorSpaceMode getMode() { return csDeviceCMYK; }
virtual void getGray(GfxColor *color, double *gray); virtual void getGray(GfxColor *color, GfxGray *gray);
virtual void getRGB(GfxColor *color, GfxRGB *rgb); virtual void getRGB(GfxColor *color, GfxRGB *rgb);
virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk); virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
...@@ -275,7 +333,7 @@ public: ...@@ -275,7 +333,7 @@ public:
// Construct a Lab color space. Returns NULL if unsuccessful. // Construct a Lab color space. Returns NULL if unsuccessful.
static GfxColorSpace *parse(Array *arr); static GfxColorSpace *parse(Array *arr);
virtual void getGray(GfxColor *color, double *gray); virtual void getGray(GfxColor *color, GfxGray *gray);
virtual void getRGB(GfxColor *color, GfxRGB *rgb); virtual void getRGB(GfxColor *color, GfxRGB *rgb);
virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk); virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
...@@ -320,7 +378,7 @@ public: ...@@ -320,7 +378,7 @@ public:
// Construct an ICCBased color space. Returns NULL if unsuccessful. // Construct an ICCBased color space. Returns NULL if unsuccessful.
static GfxColorSpace *parse(Array *arr); static GfxColorSpace *parse(Array *arr);
virtual void getGray(GfxColor *color, double *gray); virtual void getGray(GfxColor *color, GfxGray *gray);
virtual void getRGB(GfxColor *color, GfxRGB *rgb); virtual void getRGB(GfxColor *color, GfxRGB *rgb);
virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk); virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
...@@ -357,7 +415,7 @@ public: ...@@ -357,7 +415,7 @@ public:
// Construct a Lab color space. Returns NULL if unsuccessful. // Construct a Lab color space. Returns NULL if unsuccessful.
static GfxColorSpace *parse(Array *arr); static GfxColorSpace *parse(Array *arr);
virtual void getGray(GfxColor *color, double *gray); virtual void getGray(GfxColor *color, GfxGray *gray);
virtual void getRGB(GfxColor *color, GfxRGB *rgb); virtual void getRGB(GfxColor *color, GfxRGB *rgb);
virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk); virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
virtual void getRGBLine(Guchar *in, unsigned int *out, int length); virtual void getRGBLine(Guchar *in, unsigned int *out, int length);
...@@ -396,7 +454,7 @@ public: ...@@ -396,7 +454,7 @@ public:
// Construct a Separation color space. Returns NULL if unsuccessful. // Construct a Separation color space. Returns NULL if unsuccessful.
static GfxColorSpace *parse(Array *arr); static GfxColorSpace *parse(Array *arr);
virtual void getGray(GfxColor *color, double *gray); virtual void getGray(GfxColor *color, GfxGray *gray);
virtual void getRGB(GfxColor *color, GfxRGB *rgb); virtual void getRGB(GfxColor *color, GfxRGB *rgb);
virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk); virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
...@@ -429,7 +487,7 @@ public: ...@@ -429,7 +487,7 @@ public:
// Construct a DeviceN color space. Returns NULL if unsuccessful. // Construct a DeviceN color space. Returns NULL if unsuccessful.
static GfxColorSpace *parse(Array *arr); static GfxColorSpace *parse(Array *arr);
virtual void getGray(GfxColor *color, double *gray); virtual void getGray(GfxColor *color, GfxGray *gray);
virtual void getRGB(GfxColor *color, GfxRGB *rgb); virtual void getRGB(GfxColor *color, GfxRGB *rgb);
virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk); virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
...@@ -464,7 +522,7 @@ public: ...@@ -464,7 +522,7 @@ public:
// Construct a Pattern color space. Returns NULL if unsuccessful. // Construct a Pattern color space. Returns NULL if unsuccessful.
static GfxColorSpace *parse(Array *arr); static GfxColorSpace *parse(Array *arr);
virtual void getGray(GfxColor *color, double *gray); virtual void getGray(GfxColor *color, GfxGray *gray);
virtual void getRGB(GfxColor *color, GfxRGB *rgb); virtual void getRGB(GfxColor *color, GfxRGB *rgb);
virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk); virtual void getCMYK(GfxColor *color, GfxCMYK *cmyk);
...@@ -617,6 +675,8 @@ public: ...@@ -617,6 +675,8 @@ public:
void getDomain(double *x0A, double *y0A, double *x1A, double *y1A) void getDomain(double *x0A, double *y0A, double *x1A, double *y1A)
{ *x0A = x0; *y0A = y0; *x1A = x1; *y1A = y1; } { *x0A = x0; *y0A = y0; *x1A = x1; *y1A = y1; }
double *getMatrix() { return matrix; } double *getMatrix() { return matrix; }
int getNFuncs() { return nFuncs; }
Function *getFunc(int i) { return funcs[i]; }
void getColor(double x, double y, GfxColor *color); void getColor(double x, double y, GfxColor *color);
private: private:
...@@ -650,9 +710,11 @@ public: ...@@ -650,9 +710,11 @@ public:
{ *x0A = x0; *y0A = y0; *x1A = x1; *y1A = y1; } { *x0A = x0; *y0A = y0; *x1A = x1; *y1A = y1; }
double getDomain0() { return t0; } double getDomain0() { return t0; }
double getDomain1() { return t1; } double getDomain1() { return t1; }
void getColor(double t, GfxColor *color);
GBool getExtend0() { return extend0; } GBool getExtend0() { return extend0; }
GBool getExtend1() { return extend1; }