x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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!

Product Version: Not Selected
Tags:
more ▼

asked Aug 11 '14 at 03:02 PM in C++ Programming

avatar image

Pseudocorpus
421 37 47 143

avatar image Pseudocorpus Aug 11 '14 at 05:22 PM

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

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

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

more ▼

answered Aug 11 '14 at 05:36 PM

avatar image

joeGraf STAFF
1.5k 35 12 69

avatar image Pseudocorpus Aug 11 '14 at 05:44 PM

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!

avatar image joeGraf STAFF Aug 11 '14 at 05:59 PM

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

avatar image Pseudocorpus Aug 11 '14 at 07:47 PM

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. :-(

I found a post that says that PushMaskRegion() is not exposed to the engine API: https://answers.unrealengine.com/questions/53845/canvas-clipping-region.html

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

(comments are locked)
10|2000 characters needed characters left
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question