Is there a way in unreal engine to clip HUD/Canvas Draw Text to a certain region? I tried setting the TextItem BlendMode to translucent however the really long test text string still goes over the bounds of the rectangle I draw below it. I have looked at Slate and it seems to do it (though I’m not sure how) and I wish to avoid it as both the layout management syntax is strange and the widgets don’t fit with the native operating system.
I know you can get the pixel dimensions for the text and so limit it on the x axis length, however there seems no way to just draw the bottom of half of the text for a scrolling widget that only partially shows that text.
@anonymous_user_f5a50610 that works great for horizontal text but not for vertical cutoffs that occur when having a panel scroll. The editor has plenty of these, where if you scroll to show only half of the text it works. So it must be able to be done however UE doesn’t present an obvious way to clip a region. I have looked through the slate code with no avail.
I believe Slate can also clip non axis aligned rectangles. To do this with Canvas you would probably need to either use masks with materials or cut up the triangles and update the UV coords. This would require replacing all existing canvas items to work correctly so materials may be easier with better masking options if anyone is interested in going beyond singular axis aligned clipping rects.
I am using unreal engine of version 4.22. The code can be compiled successfully with little modification, but it doesn’t work for me. Nothing is actually clipped at all. Is there any issue with it for unreal engine of recent versions? Sorry for my bad English.