discuss-gnustep
[Top][All Lists]
Advanced

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

draw vs. composite image in drawRect


From: Riccardo Mottola
Subject: draw vs. composite image in drawRect
Date: Wed, 15 Aug 2018 18:13:13 +0200
User-agent: Mozilla/5.0 (X11; NetBSD i386; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Hi,

I have subclassed NSProgressIndicator and want to draw totally my own stuff, actually, I just intend to draw an image.

Actually, I am adapting code that works in GWorkspace: there the indicator is a subclass in NSView, I want to make it as subclass of NSProgressView.

I do in drawRect:

      [img compositeToPoint: NSZeroPoint
                  operation: NSCompositeSourceOver]

however, it is not working.


if instead I do:


[img drawAtPoint:NSZeroPoint fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1];


it works! why?


Riccardo





reply via email to

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