[Top][All Lists]

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

Re: cairo vs. art and PDFKit

From: Eric Wasylishen
Subject: Re: cairo vs. art and PDFKit
Date: Fri, 24 Feb 2012 13:01:42 -0700

Hi Riccardo,

I looked in to this a bit more, and what I said before isn't really correct. 
-[NSImageRep draw] is a primitive method so subclasses must override it, so the 
error is really in PDFKit.
Probably the simplest fix is to keep the PDFKit's -drawInRect: as-is, and add a 
draw method

- (void) draw
        NSSize size = [self size];
        [self drawInRect: NSMakeRect(0, 0, size.width, size.height)];

I added a comment to NSImageRep.h to make this more explicit.


On 2012-02-24, at 9:17 AM, Riccardo Mottola wrote:

> Hi Eric,
> On 02/23/12 21:13, Eric Wasylishen wrote:
>> Hi Riccardo,
>> Thanks for the bug report, this is an interesting one.
>> It looks like I made some oversights with how NSImageRep expects to be 
>> overridden - currently it looks like image rep subclasses must override 
>> -draw in order to work properly. By chance when cairo is not in use, we 
>> don't hit this bug.
>> As a quick workaround you can change the -drawRect: method in PDFImageRep.m 
>> to a -draw method:
> indeed, with that fix it works. Do you think you can fix this in -back and we 
> can make soon a minor release? I'd like not to make that patch definitive.
> Or I make the patch available so that Sebastian and Richard can package a 
> working GSPdf
> Thank you,
>   Riccardo
> _______________________________________________
> Discuss-gnustep mailing list
> Discuss-gnustep@gnu.org
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep

reply via email to

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