gnustep-dev
[Top][All Lists]
Advanced

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

Re: Various retain/release bugs


From: Fred Kiefer
Subject: Re: Various retain/release bugs
Date: Mon, 25 Feb 2002 13:02:31 +0100

Hi Michael,

Michael Hanni wrote:
> That is not to say that a rewrite would be a bad thing. :-) In particular
> drawRect: and selectTabViewItem: should be rewritten to make the drawing more
> precise and the switching of views correct (i.e. currently the views don't
> resize properly before being added to the tab view after the tab view's size
> changes -- pretty easy fix though.) If someone could point me to a tutorial of
> how to use NSBezierPath correctly I'd love to write the tab drawing code again
> (with some additional styles as well.) Also, I never wrote the code for
> shortening of label strings among other things...

NSBezierPath is not that hard to use and all the methods are well
documented by Apple. Basically you just create a new path
(new = [NSBezierPath bezierPath]) a use this as the target of your
normal PS operations, so instead of PSmoveto(x, y) you call [new
moveToPoint: NSMakePoint(x, y)] and so on. It also allows you to set the
some of the line parameters (but not the colour!). And after you have
build up the  path you call [new stroke] (or fill) to transfer the path
to the backend. 

As the xgps backend uses an NSBezierPath internally that class should be
mostly working (Otherwise we would have noticed). There are some parts
that are missing: Glyph handling (which we probably never will add) and
one form of arcs (which is not to hard to implement, but to much
mathematics for me. Ok, I may try to revive my old memories of basic
geometry).

Hope this helps, if you have more specific questions on NSBezierPath
feel free to ask. I really would like to see that class more widely
used.

Cheers
Fred





reply via email to

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