Questions tagged [masking]

Force user input to conform to given rules.

Input masking restricts inputs for a given UI element without actually performing validation. Instead of collecting and validating user input, the masking approach restricts the inputs that a user can make in the first place.

An example of this would be a text field that is set to accept telephone numbers from a given country: instead of collecting digits and letters, and then validating them against the format, an input-masked field will only allow digits to be input, and will only accept them in an order that forms a valid input.

When dealing with arrays / matrices 'masking' means to ignoring certain parts of the array an only use the unmasked elements for further calculations.

1153 questions
0
votes
1 answer

Text Masking not working with HTML canvas

I am trying to do text masking in javascript. Below is my code :- if(this.image!==null) { canvasContext.drawImage(this.image, 0, 0, this.width, this.height); } canvasContext.font = "55px Arial"; canvasContext.textAlign =…
0
votes
1 answer

Resize image and drag position using jquery and saving the output to html

I'm trying to build a little tool that enables me to take an image, put a PNG transparent mask over it, then scale and drag the image in place to get it perfectly positioned/sized within the mask. Here is the jquery. $(window).load(function(){ var…
Jeff Solomon
  • 459
  • 6
  • 21
0
votes
1 answer

oCanvas masking with several display objects

I'm using oCanvas to create triangles that mask images, each triangle masks a different image. The problem I'm facing is that when I mask these triangles they hide whatever is outside it, so the last triangle masks the triangles underneath. Is there…
0
votes
1 answer

add masking to an animating uiimageview in ios

I am creating a basic animation of opening and closing of doors(like in a lift, its two doors slide back and fro). I have used CABasicAnimation for translation of two doors(two imageview). My problem is when the door(imageview) slides out, the…
A_Thorne
  • 141
  • 1
  • 12
0
votes
1 answer

Gradually fill an NSTextField with colour

I'm trying to find an effecient way of dynamically displaying text in an NSTextField and slowly filling it with a colour. Would the best way of doing this be by creating two labels on top of eachother, one with a black colour and one with say…
0
votes
1 answer

How use one one sprite as mask for other, if they in different containers with different coordinate spaces?

How to make some Shape or Bitmap to became unmovable mask, which cut all graphics above mask. (they laying in different containers with different coordinate spaces) Some explanation: I have some vector Shape in one class, some Bitmap images in…
kolombet
  • 87
  • 1
  • 1
  • 7
0
votes
1 answer

Using image sheets with graphics.newMask() in Corona

In Corona SDK, I'd like to use an image sheet frame with graphics.newMask() instead of an image file name. So instead of: myMaskPtr = graphics.newMask("myMask.png"); I'd like to use something like: myImageSheetPtr = graphics.newImageSheet(…
0
votes
1 answer

How to save a UIImage with a mask

I have a UIImageView that can be moved/scaled (self.imageForEditing). On top of this image view I have an overlay with a hole cut out, which is static and can't be moved. I need to save just the part of the underlying image that is visible through…
soleil
  • 12,133
  • 33
  • 112
  • 183
0
votes
1 answer

Remove some extra text from a String using Regex

I am building SMS gateway where I want to mask any credential info (e.g. password) if the SMS message has any before persisting it into the database. Here is the code: String message = "Your password is [MASK:1234]!"; boolean bMasked =…
Eng.Fouad
  • 115,165
  • 71
  • 313
  • 417
0
votes
1 answer

PIC Bit Masking and Shifting for 4 Bit LCD Control

I have a question regarding both masking and bit shifting. I have the following code: void WriteLCD(unsigned char word, unsigned commandType, unsigned usDelay) { // Most Significant Bits // Need to do bit masking for upper nibble, and shift…
0
votes
2 answers

Redirecting to another site by masking url

I want to redirect all the users who enters www.siteA.com/folder1 to www.siteB.com/folder. But user should see www.siteA.com/folder1 in address bas even after redirection to www.siteB.com. I do not know how to do it with .htaccess Can somebody…
user1083644
  • 23
  • 2
  • 8
0
votes
1 answer

as3 how to ignore MOUSE_DOWN outside mask

I am working on a jigsaw-like game in as3 where irregularly shaped layers imported from photoshop are used to mask parts of their original background. By setting cacheAsBitmap=true on the mask and its contents the result is a nice irregular shape…
user2016210
  • 119
  • 4
  • 13
0
votes
3 answers

Mask by n bytes

I struggle masking a uint64_t variable by N bytes. I do not know N but I know it is 8 or less. My current code looks like this: // uint64_t n is given uint64_t mask; for( mask = 0x00; n; n--) { mask = mask<<8 | 0xFF; } for building the mask.…
musicmatze
  • 4,124
  • 7
  • 33
  • 48
0
votes
1 answer

What are some alternatives to multiplication in Java?

To be more specific, there are constraints on my assignment that disallow me to use multiplication and more than 2 if-else statements. The method should take a number, such as 0xAAA5, and replace one of the 4-bit sections with the given nibble, such…
Evan LaHurd
  • 977
  • 2
  • 14
  • 27
0
votes
2 answers

Mask on images to prevent copying

There is on internet. Such script that, "jumps" before an another image. So... for example, if I found an image, and I click on "Save as..." I get a 1x1 pixel image in place of the one I wanted to safe. For example of it…
Rik Telner
  • 179
  • 1
  • 10