bug-gnustep
[Top][All Lists]
Advanced

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

Re: NSBezierPath setLineDash


From: Fred Kiefer
Subject: Re: NSBezierPath setLineDash
Date: Mon, 07 Oct 2002 01:12:36 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.8) Gecko/20020204

Hi Stefan,

Stefan Urbanek wrote:
Whe I set NSBezierPath setLineDash:count:phase: to one path then all paths created after that one will have same line dash style. I think it should be local to the path, or is it global? This value is reset after each NSView drawRect:.

I had a look at this and it is not the method setLineDash:count:phase: that causes the problem, but the interaction between the NSBezierPath and the backend. We only send over the dash settings, if there is a dash at all, but we do not reset it, when we have no dash. Also the handling of this should be changed in some of the backends, art and winlib seem to get this correct, but I am not that sure about xlib. I will do some clean up here, but this will take a bit of time.

This is just one of the places where our current fontend backend interface could need some improvements. My position here is that all the PS interfaces to change any of the path drawing parameters should be deprecated and NSBezierPath methods used instead (This does not make a real difference, but would introduce the newer interfaces into our own code). In the backend those parameters would also be held inside of the current NSBezierPath (and of course changed, when a new path gets selected). Each time a path gets drawn those parameters would be applied again to the backend specific graphic context. It is easy to construct situations, where this may be a bit of an overhead, but for well structured drawing code it would not make a difference. And if we add the long discussed setPath: method for the graphic context, it may even be faster.

Fred








reply via email to

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