- msg("<warning> %s not yet %ssupported!",feature,fully?"fully ":"");
+ if(warn) {
+ msg("<warning> %s not yet %ssupported!",feature,fully?"fully ":"");
+ if(this->config_break_on_warning) {
+ msg("<fatal> Aborting conversion due to unsupported feature");
+ exit(1);
+ }
+ } else {
+ msg("<notice> File contains %s",feature);
+ }
+}
+void GFXOutputDev::warnfeature(char*feature,char fully)
+{
+ showfeature(feature,fully,1);
+}
+void GFXOutputDev::infofeature(char*feature)
+{
+ showfeature(feature,0,0);
- if(!strcmp(p->name,"forceType0Fonts")) {
- this->forceType0Fonts = atoi(p->value);
- } else if(!strcmp(p->name,"fontconfig")) {
+ if(!strcmp(p->name,"fontconfig")) {
-/*----------------------------------------------------------------------------
- * Primitive Graphic routines
- *----------------------------------------------------------------------------*/
+GBool GFXOutputDev::useTilingPatternFill()
+{
+ infofeature("tiled patterns");
+ return gFalse;
+}
+
+GBool GFXOutputDev::useShadedFills()
+{
+ infofeature("shaded fills");
+ return gFalse;
+}
{
double x1, y1, x2, y2, w;
gfxline_t points[5];
{
double x1, y1, x2, y2, w;
gfxline_t points[5];
- cvt->convertToType1(NULL, gTrue, FoFiWrite, f);
+ cvt->convertToType1(0, NULL, gTrue, FoFiWrite, f);
//cvt->convertToCIDType0("test", f);
//cvt->convertToType0("test", f);
delete cvt;
//cvt->convertToCIDType0("test", f);
//cvt->convertToType0("test", f);
delete cvt;
/* TODO: pass image_dpi to device instead */
dev->setparameter(dev, "next_bitmap_is_jpeg", "1");
/* TODO: pass image_dpi to device instead */
dev->setparameter(dev, "next_bitmap_is_jpeg", "1");
- gfxline_show(&p1,stdout);
-
- printf("%.2f %.2f %.2f\n", m.m00, m.m10, m.tx);
- printf("%.2f %.2f %.2f\n", m.m01, m.m11, m.ty);
dev->fillbitmap(dev, &p1, &img, &m, 0);
}
dev->fillbitmap(dev, &p1, &img, &m, 0);
}
GfxPath * path = state->getPath();
gfxline_t*line= gfxPath_to_gfxline(state, path, 1, user_movex + clipmovex, user_movey + clipmovey);
GfxPath * path = state->getPath();
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 + clipmovex, user_movey + clipmovey);
gfxline_t*line= gfxPath_to_gfxline(state, path, 1, user_movex + clipmovex, user_movey + clipmovey);
-
- if(getLogLevel() >= LOGLEVEL_TRACE) {
- msg("<trace> eofill\n");
- dump_outline(line);
- }
-
- device->fill(device, line, &col);
+ fillGfxLine(state, line);
void GFXOutputDev::beginTransparencyGroup(GfxState *state, double *bbox,
GfxColorSpace *blendingColorSpace,
GBool isolated, GBool knockout,
void GFXOutputDev::beginTransparencyGroup(GfxState *state, double *bbox,
GfxColorSpace *blendingColorSpace,
GBool isolated, GBool knockout,
dbg("beginTransparencyGroup %.1f/%.1f/%.1f/%.1f %s isolated=%d knockout=%d forsoftmask=%d", bbox[0],bbox[1],bbox[2],bbox[3], colormodename, isolated, knockout, forSoftMask);
dbg("using clipping rect %f/%f/%f/%f\n", rect.posx,rect.posy,rect.width,rect.height);
msg("<verbose> beginTransparencyGroup %.1f/%.1f/%.1f/%.1f %s isolated=%d knockout=%d forsoftmask=%d", bbox[0],bbox[1],bbox[2],bbox[3], colormodename, isolated, knockout, forSoftMask);
dbg("beginTransparencyGroup %.1f/%.1f/%.1f/%.1f %s isolated=%d knockout=%d forsoftmask=%d", bbox[0],bbox[1],bbox[2],bbox[3], colormodename, isolated, knockout, forSoftMask);
dbg("using clipping rect %f/%f/%f/%f\n", rect.posx,rect.posy,rect.width,rect.height);
msg("<verbose> beginTransparencyGroup %.1f/%.1f/%.1f/%.1f %s isolated=%d knockout=%d forsoftmask=%d", bbox[0],bbox[1],bbox[2],bbox[3], colormodename, isolated, knockout, forSoftMask);
dbg("paintTransparencyGroup blend=%s softmaskon=%d", blendmodes[state->getBlendMode()], states[statepos].softmask);
msg("<verbose> paintTransparencyGroup blend=%s softmaskon=%d", blendmodes[state->getBlendMode()], states[statepos].softmask);
dbg("paintTransparencyGroup blend=%s softmaskon=%d", blendmodes[state->getBlendMode()], states[statepos].softmask);
msg("<verbose> paintTransparencyGroup blend=%s softmaskon=%d", blendmodes[state->getBlendMode()], states[statepos].softmask);
+
+ if(state->getBlendMode() == gfxBlendNormal)
+ infofeature("transparency groups");
+ else {
+ char buffer[80];
+ sprintf(buffer, "%s blended transparency groups", blendmodes[state->getBlendMode()]);
+ warnfeature(buffer, 0);
+ }
bbox[0], bbox[1], bbox[2], bbox[3], alpha, colToByte(rgb->c[0]), colToByte(rgb->c[1]), colToByte(rgb->c[2]));
msg("<verbose> setSoftMask %.1f/%.1f/%.1f/%.1f alpha=%d backdrop=%02x%02x%02x",
bbox[0], bbox[1], bbox[2], bbox[3], alpha, colToByte(rgb->c[0]), colToByte(rgb->c[1]), colToByte(rgb->c[2]));
bbox[0], bbox[1], bbox[2], bbox[3], alpha, colToByte(rgb->c[0]), colToByte(rgb->c[1]), colToByte(rgb->c[2]));
msg("<verbose> setSoftMask %.1f/%.1f/%.1f/%.1f alpha=%d backdrop=%02x%02x%02x",
bbox[0], bbox[1], bbox[2], bbox[3], alpha, colToByte(rgb->c[0]), colToByte(rgb->c[1]), colToByte(rgb->c[2]));
states[statepos].olddevice = this->device;
this->device = (gfxdevice_t*)rfx_calloc(sizeof(gfxdevice_t));
states[statepos].olddevice = this->device;
this->device = (gfxdevice_t*)rfx_calloc(sizeof(gfxdevice_t));
dbg("softmaskrecording is %08x at statepos %d\n", states[statepos].softmaskrecording, statepos);
states[statepos].softmask = 1;
dbg("softmaskrecording is %08x at statepos %d\n", states[statepos].softmaskrecording, statepos);
states[statepos].softmask = 1;
belowrender.setparameter(&belowrender, "antialize", "2");
belowrender.startpage(&belowrender, width, height);
gfxresult_record_replay(below, &belowrender);
belowrender.endpage(&belowrender);
gfxresult_t* belowresult = belowrender.finish(&belowrender);
gfximage_t* belowimg = (gfximage_t*)belowresult->get(belowresult,"page0");
belowrender.setparameter(&belowrender, "antialize", "2");
belowrender.startpage(&belowrender, width, height);
gfxresult_record_replay(below, &belowrender);
belowrender.endpage(&belowrender);
gfxresult_t* belowresult = belowrender.finish(&belowrender);
gfximage_t* belowimg = (gfximage_t*)belowresult->get(belowresult,"page0");
gfxcolor_t* l1 = &maskimg->data[maskimg->width*y];
gfxcolor_t* l2 = &belowimg->data[belowimg->width*y];
for(x=0;x<width;x++) {
gfxcolor_t* l1 = &maskimg->data[maskimg->width*y];
gfxcolor_t* l2 = &belowimg->data[belowimg->width*y];
for(x=0;x<width;x++) {
- /* premultiply alpha... do we need this? (depends on output device)
- l2->r = (l2->a*l2->r) >> 8;
- l2->g = (l2->a*l2->g) >> 8;
- l2->b = (l2->a*l2->b) >> 8;
- */
+ /* premultiply alpha */
+ l2->a = div255(alpha*l2->a);
+ l2->r = div255(alpha*l2->r);
+ l2->g = div255(alpha*l2->g);
+ l2->b = div255(alpha*l2->b);