Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Drawing lines

0 views
Skip to first unread message

Paul Giller

unread,
Apr 10, 2009, 11:43:57 PM4/10/09
to
If this is not the right forum for this, please forgive me.

I am a long time programmer, but have never really gotten into graphics
development (and am a recent convert from Windows to Mac, if that
matters).

I need to develop some programs that will draw lines from point A to
point B (as on a map). I can handle the logic for the programming and
will be
using XCode (which I am also new in), programming in C++ (which I am
just getting back into after years of not using it). I'm not sure
which kind of
Project in XCode will lend itself to what I need to do (i.e Cocoa, one
of the Bundle projects, dynamic library, or none of these, etc).

The project will use different line type (single lines, double lines, etc).

Thanks for any pointers.

-=paul=-


Gregory Weston

unread,
Apr 11, 2009, 7:48:49 AM4/11/09
to
In article <2009041023435716807-pgiller@gillernetnet>,
Paul Giller <pgi...@gillernet.net> wrote:

> If this is not the right forum for this, please forgive me.
>
> I am a long time programmer, but have never really gotten into graphics
> development (and am a recent convert from Windows to Mac, if that
> matters).
>
> I need to develop some programs that will draw lines from point A to
> point B (as on a map). I can handle the logic for the programming and
> will be
> using XCode (which I am also new in), programming in C++ (which I am
> just getting back into after years of not using it). I'm not sure
> which kind of
> Project in XCode will lend itself to what I need to do (i.e Cocoa, one
> of the Bundle projects, dynamic library, or none of these, etc).

Well, that really kind of depends on what your desired result is. If
you're looking to write a freestanding program - as compared to, say, a
plugin or tool for other developers' products - you'll probably want a
Cocoa program.

You'll also want to be looking into the Objective-C language. It's
different from C++, but simple to learn and ultimately it's the way
forward for development of first-class apps for Mac OS X. The couple of
hours it'll take to learn (assuming you're still relatively facile with
straight C) will pay off greatly and almost immediately.

If you're not familiar with C, brush up. Get yourself back up to speed
there using whatever resources you like. Once you're ready for Cocoa,
you'll want a copy of "Cocoa Programming for Mac OS X" by Aaron
Hillegass. It's a functional introduction to the most basic elements of
Xcode and an excellent tutorial for Cocoa.

The canvas on which you draw will be a subclass of NSView. The principal
line drawing tool in Cocoa is NSBezierPath.

That should be enough to digest for a start and, as it happens, it's
also sufficient information to do the high-level task you've described.
Please feel free to ask more detailed questions once you get going.

G

--
I saw a truck today that had "AAA Batteries / Delivered and Installed" on the
side. My first thought was: That's a really weird business model. How many
inept people have urgent need of skinny little battery cells?

Paul Giller

unread,
Apr 11, 2009, 8:59:27 AM4/11/09
to
On 2009-04-11 07:48:49 -0400, Gregory Weston <u...@splook.com> said:

> In article <2009041023435716807-pgiller@gillernetnet>,
> Paul Giller <pgi...@gillernet.net> wrote:
>> I need to develop some programs that will draw lines from point A to
>> point B (as on a map). I can handle the logic for the programming and

>> will be using XCode [...]


>
> If you're not familiar with C, brush up. Get yourself back up to speed
> there using whatever resources you like. Once you're ready for Cocoa,
> you'll want a copy of "Cocoa Programming for Mac OS X" by Aaron
> Hillegass. It's a functional introduction to the most basic elements of
> Xcode and an excellent tutorial for Cocoa.
>
> The canvas on which you draw will be a subclass of NSView. The principal
> line drawing tool in Cocoa is NSBezierPath.

Thanks for the quick response. NSBezierPath is exactly what I'm looking for.

I appreciate it!

-=Paul=-

0 new messages