Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!news2.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!newsfe01.iad.POSTED!7564ea0f!not-for-mail
From: Walter Roberson <roberson@hushmail.com>
Organization: Canada Eat The Cookie Foundation
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
Newsgroups: comp.soft-sys.matlab
Subject: Re: Redrawing graphics objects
References: <gd3cgh$aeu$1@fred.mathworks.com>
In-Reply-To: <gd3cgh$aeu$1@fred.mathworks.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Lines: 18
Message-ID: <SdeJk.734$1r2.316@newsfe01.iad>
NNTP-Posting-Host: 24.79.146.116
X-Complaints-To: internet.abuse@sjrb.ca
X-Trace: newsfe01.iad 1224044530 24.79.146.116 (Wed, 15 Oct 2008 04:22:10 UTC)
NNTP-Posting-Date: Wed, 15 Oct 2008 04:22:10 UTC
Date: Tue, 14 Oct 2008 23:22:38 -0500
Xref: news.mathworks.com comp.soft-sys.matlab:495232


Ryan Ollos wrote:
> I have an animation that moves an image around a 2D axes.  I move the image by changing its
>  'Position' property.  Also in the axes are a number of line objects, positioned vertically.

> The problem I have is that the image is sometimes positioned over vertical lines, and I
> would like these lines to always be visible

Which renderer are you using? If you are using the OpenGL renderer (only), then
the stacking order of lines compared to flat objects at the same Z plane ignored.
-Somewhere- it is documented which will show up on top, but I have found that
in practice it depends upon your graphics drivers and upon your operating system --
e.g., for me on Linux-64 over X, the order is the reverse of what is documented.

If you are using any renderer other than OpenGL, then the stacking order is
supposedly obeyed... but OpenGL is the only renderer that supports transparency...
In theory if you add a small Z offset to either the line or the image
(or patch) then they will no longer be in the same plane and the one that
is "closer" to the viewpoint will appear "on top".