discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing with xlib & art backend


From: Riccardo Mottola
Subject: Re: Printing with xlib & art backend
Date: Sat, 06 Jul 2013 15:53:18 +0200
User-agent: Mozilla/5.0 (X11; OpenBSD i386; rv:13.0) Gecko/20120803 Firefox/13.0.1 SeaMonkey/2.10.1

Hi,

Fred Kiefer wrote:
I most admit that I don't fully understand the issue here. We never supported GSDefineGState in GSStreamContext and this would have always resulted in an exception when called. Which is one of the known limitation of that code and a reason why we have to drop support for all these backends in the near future.

Right, I'm still investigating, my intention was not to blame Eric at all, sorry if it got understood that way.
I see two things:
Eric provided a "new" and an "old" code path, where the old codepath composites inside an off-screen windows. The old-style function, brought from NSImage to NSImageRep was though updated and the DPS which requires gState. What I do not fully understand is why it works for screen and not for printing.
Eric's change should, as far as I see only call GSDefineGState if the context has supportsDrawingGState return YES. Which should only be true for the cairo and the windows backend. I don't see how you should ever end up there for the art or xlib backend. Could you please provide me with a back trace of the stack, when this happens?

That part of code is however unchecked, from what I can understand. I tried adding "supportsDrawingGState" before GSDefineGState and GSUndefineGState, but then screen rendering gets broken too (well, there is no gState for the DPS function).


here the relevant part of the trace:


#2  0x02e9b973 in +[NSException raise:format:] (self=0x22e48e60,
_cmd=0x22eb81e0, name=0x22e49100, format=0x22eb8270) at NSException.m:838 #3 0x03009963 in -[NSObject(GNUstepBase) notImplemented:] (self=0x7ffc8084,
    _cmd=0x29e79c38, aSel=0x24fea178) at NSObject+GNUstepBase.m:97
#4  0x09e8e7df in -[GSStreamContext(Ops) GSDefineGState] (self=0x7ffc8084,
    _cmd=0x24fea178) at GSStreamContext.m:365
#5  0x050fa0b4 in -[NSImageRep guiDrawInRect:fromRect:operation:fraction:] (
    self=0x83689f84, _cmd=0x24fea210, dstRect=
{origin = {x = 0, y = 0}, size = {width = 800, height = 834}}, srcRect= {origin = {x = 0, y = 0}, size = {width = 800, height = 834}}, op=2,
    delta=1) at NSImageRep.m:746
#6 0x050f8fd2 in -[NSImageRep drawInRect:fromRect:operation:fraction:respectFlipped:hints:] (self=0x83689f84, _cmd=0x24fe7768, dstRect= {origin = {x = 0, y = 0}, size = {width = 800, height = 834}}, srcRect= {origin = {x = 0, y = 0}, size = {width = 800, height = 834}}, op=2,
    delta=1, respectFlipped=1 '\001', hints=0x0) at NSImageRep.m:847
#7 0x050f5f2a in -[NSImage drawInRect:fromRect:operation:fraction:respectFlipped:hints:] (self=0x86f59204, _cmd=0x24fe85b8, dstRect=
    srcRect={origin = {x = 0, y = 0}, size = {width = 800, height = 834}},
op=2, delta=1, respectFlipped=Variable "respectFlipped" is not available.
) at NSImage.m:916
#8  0x050f6d9d in -[NSImageCell drawInteriorWithFrame:inView:] (
    self=0x7eb92084, _cmd=0x24fba1e8, cellFrame=
        {origin = {x = 0, y = 0}, size = {width = 800, height = 834}},
    controlView=0x849f5504) at NSImageCell.m:258
#9  0x05089022 in -[NSCell drawWithFrame:inView:] (self=0x7eb92084,
    _cmd=0x24fcadd8, cellFrame=
        {origin = {x = 0, y = 0}, size = {width = 800, height = 834}},
    controlView=0x849f5504) at NSCell.m:2067
#10 0x050b36d6 in -[NSControl drawCell:] (self=0x849f5504, _cmd=0x24fcadd0,
    aCell=0x7eb92084) at NSControl.m:685
#11 0x050b3722 in -[NSControl drawRect:] (self=0x849f5504, _cmd=0x2504fa88,
    aRect={origin = {x = 0, y = 0}, size = {width = 540, height = 648}})
    at NSControl.m:675
#12 0x051f2090 in -[NSView displayRectIgnoringOpacity:inContext:] (
    self=0x849f5504, _cmd=0x25010480, aRect=
        {origin = {x = 0, y = 0}, size = {width = 540, height = 648}},
    context=0x7ffc8084) at NSView.m:2570
#13 0x05150285 in -[NSView(NSPrintOperation) _displayPageInRect:withInfo:knowsPageRange:] (self=0x849f5504, _cmd=0x25010400, pageRect= {origin = {x = 0, y = 0}, size = {width = 540, height = 648}}, info= {scaledBounds = {origin = {x = 0, y = 0}, size = {width = 800, height = 834}}, paperBounds = {origin = {x = 36, y = 72}, size = {width = 540, height = 648}}, sheetBounds = {origin = {x = 36, y = 72}, size = {width = 540, height = 648}}, paperSize = {width = 612, height = 792}, xpages = 1, ypages = 2, first = 1, last = 2, pageScale = 1, printScale = 1, nupScale = 1, nup = 1, lastWidth = 540, lastHeight = 648, orient = NSPortraitOrientation, pageDirection = 0},
    knowsPageRange=0 '\0') at NSPrintOperation.m:1216
#14 0x05150fec in -[NSPrintOperation(TrulyPrivate) _print] (self=0x7f1b4904,
    _cmd=0x25010300) at NSPrintOperation.m:1065
#15 0x05151856 in -[NSPrintOperation(TrulyPrivate) _runOperation] (
    self=0x7f1b4904, _cmd=0x25010280) at NSPrintOperation.m:669
#16 0x0514de82 in -[NSPrintOperation runOperation] (self=0x7f1b4904,
    _cmd=0x2504fc80) at NSPrintOperation.m:516
#17 0x051e6e76 in -[NSView print:] (self=0x849f5504, _cmd=0x3c0036b8,
    sender=0x82fb8004) at NSView.m:3968
#18 0x1c0014e2 in -[AppController print:] (self=0x7eb80004, _cmd=0x849f1748,
    sender=0x82fb8004) at AppController.m:897
#19 0x0504b422 in -[NSApplication sendAction:to:from:] (self=0x87573804,
    _cmd=0x24ff7d90, aSelector=0x849f1748, aTarget=0x7eb80004,
    sender=0x82fb8004) at NSApplication.m:2230
#20 0x05119681 in -[NSMenu performActionForItemAtIndex:] (self=0x86043984,
    _cmd=0x24ffaaa0, index=7) at NSMenu.m:1320





reply via email to

[Prev in Thread] Current Thread [Next in Thread]