MATLAB Answers

Is it possible to create transparent font on a graphics component?

조회 수: 5(최근 30일)
Dr. RooB
Dr. RooB 2018년 3월 26일
답변: cui 2021년 9월 13일
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.

답변(2개)

Walter Roberson
Walter Roberson 2018년 3월 26일
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
Walter Roberson
Walter Roberson 2018년 3월 26일
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.

댓글을 달려면 로그인하십시오.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by