Re: IDLgrPolygon borders [message #35539 is a reply to message #35536] |
Mon, 23 June 2003 17:32   |
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)
|
|
|