Is it possible to create transparent font on a graphics component?
8 views (last 30 days)
Show older comments
I would like to create a text object which has transparent lettering, not just a transparent background. Id rather not have to convert it to an image as I want to still use the text properties/methods after creating the object in response to user input.
0 Comments
Answers (2)
Walter Roberson
on 26 Mar 2018
Ummm, so where ever the transparent text is placed, the object "underneath" it along the line of sight should be made transparent? If there are multiple layers then should only the top-most along the line of sight be made transparent or everything all the way through? If there are two objects at equal distance along the line of sight then should they both be made transparent or should only one of them be, paying attention to to sortorder
https://blogs.mathworks.com/graphics/2014/11/04/sortmethod/
Now if it is to pay attention to sortorder then notice in Mike's 2D example that outlines can end up being drawn: how should a "one layer exposed only" rule be processed at those edges?
OK, and to confirm, exactly what is made transparent is to vary in real time as the user rotates the scene in three-space?
Would it be acceptable to to simply grab the axes background color and render the font in that? That would typically be an off-white.
2 Comments
Walter Roberson
on 26 Mar 2018
Edited: Walter Roberson
on 26 Mar 2018
You only want semi-transparent -- you want to specify an alpha parameter.
Alpha is not a documented property of text objects but it does exist. I am away from my desktop at the moment so I cannot check the details but I remember seeing it there. I would tend to suspect that Yair has documented it on his undocumentedmatlab site.
I probably will not be able to research this for about 10 or 12 hours so check his site.
See Also
Categories
Find more on Annotations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!