- gfxline_t*line= gfxPath_to_gfxline(state, path, 0, user_movex, user_movey);
+ gfxline_t*line= gfxPath_to_gfxline(state, path, 0, user_movex + clipmovex, user_movey + clipmovey);
- gfxline_t*line= gfxPath_to_gfxline(state, path, 1, user_movex, user_movey);
+ gfxline_t*line= gfxPath_to_gfxline(state, path, 1, user_movex + clipmovex, user_movey + clipmovey);
- gfxline_t*line= gfxPath_to_gfxline(state, path, 1, user_movex, user_movey);
+ gfxline_t*line= gfxPath_to_gfxline(state, path, 1, user_movex + clipmovex, user_movey + clipmovey);
- gfxline_t*line = gfxPath_to_gfxline(state, path, 1, user_movex, user_movey);
+ gfxline_t*line = gfxPath_to_gfxline(state, path, 1, user_movex + clipmovex, user_movey + clipmovey);
- gfxline_t*line = gfxPath_to_gfxline(state, path, 1, user_movex, user_movey);
+ gfxline_t*line = gfxPath_to_gfxline(state, path, 1, user_movex + clipmovex, user_movey + clipmovey);
gfxmatrix_t m = this->current_font_matrix;
state->transform(x, y, &m.tx, &m.ty);
gfxmatrix_t m = this->current_font_matrix;
state->transform(x, y, &m.tx, &m.ty);
if(render == RENDER_FILL) {
device->drawchar(device, current_gfxfont, charid, &col, &m);
if(render == RENDER_FILL) {
device->drawchar(device, current_gfxfont, charid, &col, &m);
/* apply user clip box */
if(user_clipx1|user_clipy1|user_clipx2|user_clipy2) {
/*if(user_clipx1 > x1)*/ x1 = user_clipx1;
/*if(user_clipx2 < x2)*/ x2 = user_clipx2;
/*if(user_clipy1 > y1)*/ y1 = user_clipy1;
/*if(user_clipy2 < y2)*/ y2 = user_clipy2;
/* apply user clip box */
if(user_clipx1|user_clipy1|user_clipx2|user_clipy2) {
/*if(user_clipx1 > x1)*/ x1 = user_clipx1;
/*if(user_clipx2 < x2)*/ x2 = user_clipx2;
/*if(user_clipy1 > y1)*/ y1 = user_clipy1;
/*if(user_clipy2 < y2)*/ y2 = user_clipy2;
}
//msg("<verbose> Bounding box is (%f,%f)-(%f,%f) [shifted by %d/%d]", x1,y1,x2,y2, user_movex, user_movey);
}
//msg("<verbose> Bounding box is (%f,%f)-(%f,%f) [shifted by %d/%d]", x1,y1,x2,y2, user_movex, user_movey);
- if(outer_clip_box) {
- device->endclip(device);
- outer_clip_box = 0;
- }
-
- msg("<notice> processing PDF page %d (%dx%d:%d:%d) (move:%d:%d)", pageNum, (int)x2-(int)x1,(int)y2-(int)y1, (int)x1, (int)y1, user_movex, user_movey);
+ msg("<notice> processing PDF page %d (%dx%d:%d:%d) (move:%d:%d)", pageNum, (int)x2-(int)x1,(int)y2-(int)y1, (int)x1, (int)y1, user_movex + clipmovex, user_movey + clipmovey);
link->getRect(&x1, &y1, &x2, &y2);
cvtUserToDev(x1, y1, &x, &y);
points[0].type = gfx_moveTo;
link->getRect(&x1, &y1, &x2, &y2);
cvtUserToDev(x1, y1, &x, &y);
points[0].type = gfx_moveTo;
- points[0].x = points[4].x = x + user_movex;
- points[0].y = points[4].y = y + user_movey;
+ points[0].x = points[4].x = x + user_movex + clipmovex;
+ points[0].y = points[4].y = y + user_movey + clipmovey;
points[0].next = &points[1];
cvtUserToDev(x2, y1, &x, &y);
points[1].type = gfx_lineTo;
points[0].next = &points[1];
cvtUserToDev(x2, y1, &x, &y);
points[1].type = gfx_lineTo;
points[1].next = &points[2];
cvtUserToDev(x2, y2, &x, &y);
points[2].type = gfx_lineTo;
points[1].next = &points[2];
cvtUserToDev(x2, y2, &x, &y);
points[2].type = gfx_lineTo;
points[2].next = &points[3];
cvtUserToDev(x1, y2, &x, &y);
points[3].type = gfx_lineTo;
points[2].next = &points[3];
cvtUserToDev(x1, y2, &x, &y);
points[3].type = gfx_lineTo;
points[3].next = &points[4];
cvtUserToDev(x1, y1, &x, &y);
points[4].type = gfx_lineTo;
points[3].next = &points[4];
cvtUserToDev(x1, y1, &x, &y);
points[4].type = gfx_lineTo;
+ if(!s) {
+ /* if the GoToR link has no filename, then
+ try to find a refernce in the *local*
+ file */
+ GString*g = l->getNamedDest();
+ if(g)
+ s = strdup(g->getCString());
+ }
- fwrite(data, len, 1, (FILE*)stream);
+ int ret = fwrite(data, len, 1, (FILE*)stream);
msg("<verbose> Loading %s...", filename);
font = gfxfont_load(id, filename, quality);
msg("<verbose> Loading %s...", filename);
font = gfxfont_load(id, filename, quality);
- state->transform(0, 1, &x1, &y1); x1 += user_movex; y1 += user_movey;
- state->transform(0, 0, &x2, &y2); x2 += user_movex; y2 += user_movey;
- state->transform(1, 0, &x3, &y3); x3 += user_movex; y3 += user_movey;
- state->transform(1, 1, &x4, &y4); x4 += user_movex; y4 += user_movey;
+ state->transform(0, 1, &x1, &y1); x1 += user_movex + clipmovex; y1 += user_movey + clipmovey;
+ state->transform(0, 0, &x2, &y2); x2 += user_movex + clipmovex; y2 += user_movey + clipmovey;
+ state->transform(1, 0, &x3, &y3); x3 += user_movex + clipmovex; y3 += user_movey + clipmovey;
+ state->transform(1, 1, &x4, &y4); x4 += user_movex + clipmovex; y4 += user_movey + clipmovey;
int width, int height, GBool invert,
GBool inlineImg)
{
int width, int height, GBool invert,
GBool inlineImg)
{
msg("<verbose> drawImageMask %dx%d, invert=%d inline=%d", width, height, invert, inlineImg);
drawGeneralImage(state,ref,str,width,height,0,invert,inlineImg,1, 0, 0,0,0,0, 0);
}
msg("<verbose> drawImageMask %dx%d, invert=%d inline=%d", width, height, invert, inlineImg);
drawGeneralImage(state,ref,str,width,height,0,invert,inlineImg,1, 0, 0,0,0,0, 0);
}
int width, int height, GfxImageColorMap *colorMap,
int *maskColors, GBool inlineImg)
{
int width, int height, GfxImageColorMap *colorMap,
int *maskColors, GBool inlineImg)
{
msg("<verbose> drawImage %dx%d, %s, %s, inline=%d", width, height,
colorMap?"colorMap":"no colorMap",
maskColors?"maskColors":"no maskColors",
msg("<verbose> drawImage %dx%d, %s, %s, inline=%d", width, height,
colorMap?"colorMap":"no colorMap",
maskColors?"maskColors":"no maskColors",
Stream *maskStr, int maskWidth, int maskHeight,
GBool maskInvert)
{
Stream *maskStr, int maskWidth, int maskHeight,
GBool maskInvert)
{
msg("<verbose> drawMaskedImage %dx%d, %s, %dx%d mask", width, height,
colorMap?"colorMap":"no colorMap",
maskWidth, maskHeight);
msg("<verbose> drawMaskedImage %dx%d, %s, %dx%d mask", width, height,
colorMap?"colorMap":"no colorMap",
maskWidth, maskHeight);
int maskWidth, int maskHeight,
GfxImageColorMap *maskColorMap)
{
int maskWidth, int maskHeight,
GfxImageColorMap *maskColorMap)
{
msg("<verbose> drawSoftMaskedImage %dx%d, %s, %dx%d mask", width, height,
colorMap?"colorMap":"no colorMap",
maskWidth, maskHeight);
msg("<verbose> drawSoftMaskedImage %dx%d, %s, %dx%d mask", width, height,
colorMap?"colorMap":"no colorMap",
maskWidth, maskHeight);