comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Object/Direct Graphics Question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Object/Direct Graphics Question [message #29367] Tue, 12 February 2002 21:56 Go to next message
parrhasius is currently offline  parrhasius
Messages: 2
Registered: February 2002
Junior Member
I've gone back and read all the posts I could find on object graphics
vs direct graphics and I still can't decide which one is better for
what I'm trying to do. Does object graphics have any advantages at
all for working in 2D? The general consensus, at least a year ago,
seemed to be that it was best to use direct graphics for this kind of
thing, but RSI's own XROI program is written using object graphics.
Since it's a 2D drawing program, would it have been better/faster/more
maintainable if it were written using direct graphics and object
programming techniques, as David Fanning likes to suggest?

The program I'm writing is not much more complex than XROI: I need to
plot, manipulate and erase maybe 10 ~100-vertex polylines on top of
~640X400 images, but there is an order to the display of the
polylines--some of them must always be drawn on top of others, etc,
and when one is erased anything underneath it must be restored. So
what's faster: a call to TV and then 10 100-vertex PlotS calls in
direct graphics, or drawing an IDLgrImage and then drawing 10
100-vertex IDLgrPolylines in object graphics? More to the point,
since drawing such a simple system is probably fast enough using both
methods, which graphics option makes more sense given this problem?
Thanks for any help.
Re: Object/Direct Graphics Question [message #29416 is a reply to message #29367] Fri, 15 February 2002 19:03 Go to previous message
Marc Schellens is currently offline  Marc Schellens
Messages: 14
Registered: November 1999
Junior Member
parrhasius wrote:
>
> I've gone back and read all the posts I could find on object graphics
> vs direct graphics and I still can't decide which one is better for
> what I'm trying to do. Does object graphics have any advantages at
> all for working in 2D? The general consensus, at least a year ago,
> seemed to be that it was best to use direct graphics for this kind of
> thing, but RSI's own XROI program is written using object graphics.
> Since it's a 2D drawing program, would it have been better/faster/more
> maintainable if it were written using direct graphics and object
> programming techniques, as David Fanning likes to suggest?
>
> The program I'm writing is not much more complex than XROI: I need to
> plot, manipulate and erase maybe 10 ~100-vertex polylines on top of
> ~640X400 images, but there is an order to the display of the
> polylines--some of them must always be drawn on top of others, etc,
> and when one is erased anything underneath it must be restored. So
> what's faster: a call to TV and then 10 100-vertex PlotS calls in
> direct graphics, or drawing an IDLgrImage and then drawing 10
> 100-vertex IDLgrPolylines in object graphics? More to the point,
> since drawing such a simple system is probably fast enough using both
> methods, which graphics option makes more sense given this problem?
> Thanks for any help.

In my opinion OG is the right thing to use here.
Especially as you state the order of lines is important.
In OG this can be for 2D easily archieved wiht drawing them on
different Z-values.
Also there are the other advatages of OG (easy interactive
selection of objects, deriving of classes...), especially
if you have to extent your program later.
The only drawback I see is that it takes probably longer
to come clear with the coordinate systems and units in OG.
The documentation is here a little bit 'thin'.

Greetings,
marc
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Which One?
Next Topic: Sun vs PC Linux - Anyone making the shift?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 17:42:42 PDT 2025

Total time taken to generate the page: 0.00783 seconds