help-octave
[Top][All Lists]
Advanced

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

Re: force text to be in front of other objects in 3d


From: Pantxo
Subject: Re: force text to be in front of other objects in 3d
Date: Fri, 19 Oct 2018 10:26:36 -0500 (CDT)

Ben Highley wrote
> Hi, I'm wondering if there is a way to create text at a specific location
> in 3d space, but still have it be readable when other objects are in front
> of it.
> There are a couple images of what I'm trying to avoid under demonstration
> 2
> and 4 on this page:
> https://octave.sourceforge.io/octave/function/text.html
> .
> Thanks.

Hi,

No, it is not possible to disable depth sorting for a specific object (text
in you case). On the other hand, you can put all you text objects in an
overlay invisible axes. The second text demo would become 

---------------------------------------------------------------------------------------
 clf;
 h = mesh (peaks, "edgecolor", 0.7 * [1 1 1], ...
                  "facecolor", "none", ...
                  "facealpha", 0);

 caxis ([-100 100]);
 title ("Vertically Aligned at Bottom"); 

 ## here comes the trick
 hax = gca ();
 axes ("visible", "off", "xlim", xlim (hax), "ylim", ylim (hax), "zlim",
zlim (hax));

 for t = 0:45:359;
   text (25, 25, 0, "Vertical Alignment = Bottom", ...
                    "rotation", t, ...
                    "horizontalalignment", "left", ...
                    "verticalalignment", "bottom");
 endfor
---------------------------------------------------------------------------------------
 
HTH,

Pantxo



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

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