[Top][All Lists]

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

Re: DPSDoUserPath

From: Alexander Malmberg
Subject: Re: DPSDoUserPath
Date: Sun, 01 Jun 2003 22:22:13 +0200

Dan Hitt wrote:
> One nice thing that NeXTstep had was DPSDoUserPath(*,*,*,*,*,*,*),
> which you could use to send a big batch of drawing commands to the
> display server at once.
> I've grepped through the header files and i don't see this function,
> although there is this file GSGStateOps.h which includes items like
> the method DPSlineto:: (which i suppose you could call zillions of
> times to create a long path).

The (well, our set of) DPS operators are in DPSOperators.h, so you'll
probably want to look there.

> Maybe for modern hardware DPSDoUserPath() is an unnecessary optimization?

In most cases, yes. Backends should be smart enough to collect many
calls into a few large messages if they need to send things somewhere.
Thus, the individual DPS* calls should be relatively cheap. If they
aren't cheap enough, and you can define the path in advance,
GSSendBezierPath() might help.

OTOH, if you need to define a path faster than NSBezierPath/DPSlineto et
al will let you, DPSDoUserPath() could have provided more speed. If you
do run into performance problems with path handling, send me the code
with problems or some profiling data and I'll try to get rid of the
worst bottlenecks.

> Also, are there any examples of drawing applications (for GNUstep) that
> i could take a look at?

You could look at DPSTest:

> Thanks in advance for any advice, pointers, etc.
> dan

- Alexander Malmberg

reply via email to

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