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

Home » Public Forums » archive » Re: IDLgrPolygon borders
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
Re: IDLgrPolygon borders [message #35531] Tue, 24 June 2003 10:27
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
"Mark Hadfield" wrote in message...
> "David Fanning" wrote in message...
>> M. Katz writes:
>>
>>> With IDLgrPolygon objects, is it possible to have different colors
>>> for the fill and the border line? I'd like to avoid using two
>>> different objects. I'm drawing black borders around solid-colored
>>> regions.
>>
>> I think you are going to have to use IDLgrPolygon with IDLgrPolyline
>> to get what you want, probably with some sort of offset to get the
>> lines on top of the polygons. (Perhaps the offset won't be
>> necessary if you can wait for IDL 6.0 to come out. :-)
>
> The DEPTH_OFFSET keyword, introduced in version 5.5, addresses the
> "getting lines on top of filled objects" issue. Here is an excerpt
> from the documentation for IDLgrPolygon::Init:

6.0 doesn't magically eliminate stitching so I wouldn't hold your breath.
DEPTH_OFFSET or applying an appropriate transform (scale or translation) to
your border object are your two options.

If you simply want a border, take David's approach. If you want polygon
edging, use another polygon object. Use the SHARE_DATA keyword on your
edging (border) object so you don't duplicate vertex data (you will still
need to provide polygon connectivity data though).

-Rick
Re: IDLgrPolygon borders [message #35534 is a reply to message #35531] Tue, 24 June 2003 07:13 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Altyntsev Dmitriy writes:

> I wonder if some some information on "What's new in IDL 6.0" is available?

No. But very soon now. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: IDLgrPolygon borders [message #35536 is a reply to message #35534] Tue, 24 June 2003 00:39 Go to previous message
alt is currently offline  alt
Messages: 28
Registered: August 2001
Junior Member
David Fanning <david@dfanning.com> wrote in message news:
> (Perhaps the offset won't be necessary if you can
> wait for IDL 6.0 to come out. :-)

I wonder if some some information on "What's new in IDL 6.0" is available?

Thanks,
Altyntsev Dmitriy
Re: IDLgrPolygon borders [message #35539 is a reply to message #35536] Mon, 23 June 2003 17:32 Go to previous message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
"David Fanning" <david@dfanning.com> wrote in message
news:MPG.1961356e135a99cd98968c@news.frii.com...

> M. Katz writes:
>
>> With IDLgrPolygon objects, is it possible to have different colors
>> for the fill and the border line? I'd like to avoid using two
>> different objects. I'm drawing black borders around solid-colored
>> regions.
>
> I think you are going to have to use IDLgrPolygon with IDLgrPolyline
> to get what you want, probably with some sort of offset to get the
> lines on top of the polygons. (Perhaps the offset won't be
> necessary if you can wait for IDL 6.0 to come out. :-)

The DEPTH_OFFSET keyword, introduced in version 5.5, addresses the
"getting lines on top of filled objects" issue. Here is an excerpt
from the documentation for IDLgrPolygon::Init:

DEPTH_OFFSET (Get, Set)

Set this keyword to an integer value that specifies an offset in
depth to be used when rendering filled primitives. This offset is
applied along the viewing axis, with positive values moving the
primitive away from the viewer.

The units are "Z-Buffer units," where a value of 1 is used to
specify a distance that corresponds to a single step in the device's
Z-Buffer.

Use DEPTH_OFFSET to always cause a filled primitive to be rendered
slightly deeper than other primitives, independent of model
transforms. This is useful for avoiding stitching artifacts caused
by rendering lines or polygons on top of other polygons at the same
depth.

There is a usage example in "What's New in IDL 5.5" (see section on
"New Support for Resolving Stitching Artifacts in Object Graphics",
beginning on p 16.)

--
Mark Hadfield "Ka puwaha te tai nei, Hoea tatou"
m.hadfield@niwa.co.nz
National Institute for Water and Atmospheric Research (NIWA)
Re: IDLgrPolygon borders [message #35541 is a reply to message #35539] Mon, 23 June 2003 16:04 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
M. Katz writes:

> With IDLgrPolygon objects, is it possible to have different colors for
> the fill and the border line? I'd like to avoid using two different
> objects. I'm drawing black borders around solid-colored regions.

I think you are going to have to use IDLgrPolygon with
IDLgrPolyline to get what you want, probably with some
sort of offset to get the lines on top of the polygons.
(Perhaps the offset won't be necessary if you can
wait for IDL 6.0 to come out. :-)

Cheers,

David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Sinc interpolation
Next Topic: Random ordering

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

Current Time: Wed Oct 08 16:50:32 PDT 2025

Total time taken to generate the page: 0.00514 seconds