Proper use of PushMaskRegion()

So I am trying to mask out some parts of my custom HUD (Blueprintable) with the PushMaskRegion() Function. The following command compiles, but doesn’t seem to have any effect…

Canvas->Canvas->PushMaskRegion(10,10, 100, 100);

//draw various things

Canvas->Canvas->PopMaskRegion();

Do you know what might be the problem or if there is any working function for masking inside the HUD?

Thanks in advance!

So I guess I have to write my own masking function then? :-/

Hey Joe… I am creating a Textfield, into which the user can enter a variable length of text.
I want to mask this area to fit the text in certain dimensions. An Alpha for a texture won’t do the trick here. Thanks though!

Any texture you draw can have a 1bit alpha used to mask the item.

You want to look at the various clipping related functions/variables, instead of masking. See ClipX, ClipY, ClippedStrLen, etc.

I just tried to set a new canvas origin and crop it with ClipX and ClipY… but that messes with my textfield function, so it doesn’t work. And the mouse cursor is just going nuts. :frowning:

I found a post that says that PushMaskRegion() is not exposed to the engine API: How can I create a Canvas Clipping Region? - UI - Unreal Engine Forums

I have to say it’s a shame that this function worked like a charm in UE3 but not anymore.