Hi Riccardo,
I had a look and it seems I took out this chunk of code which existed in gui
0.22.0's version of -guiDrawInRect:fromRect:operation:fraction:
if (![ctxt isDrawingToScreen])
{
/* We can't composite or dissolve if we aren't drawing to a screen,
so we'll just draw the right part of the image in the right
place. */
NSPoint p;
double fx, fy;
fx = dstRect.size.width / srcRect.size.width;
fy = dstRect.size.height / srcRect.size.height;
p.x = dstRect.origin.x / fx - srcRect.origin.x;
p.y = dstRect.origin.y / fy - srcRect.origin.y;
DPSgsave(ctxt);
DPSrectclip(ctxt, dstRect.origin.x, dstRect.origin.y,
dstRect.size.width, dstRect.size.height);
DPSscale(ctxt, fx, fy);
[self drawRepresentation: [self bestRepresentationForDevice: nil]
inRect: NSMakeRect(p.x, p.y, s.width, s.height)];
DPSgrestore(ctxt);
return;
}
That explains why printing images worked with xlib and art at that time, and
doesn't now.
I think re-adding that block of code will fix the problem, making any changes
necessary to the coordinates so it works with the current codebase. It may be
worth checking the history of NSImage/NSImageRep to see if there was any
comment made in the change log / svn history when that was removed.
I'm on vacation for the next week or so and won't have a chance to do it in
that time.
Eric