Questions tagged [mask]

An image mask is a bitmap that specifies an area to paint, but not the color. In effect, an image mask acts as a stencil to specify where to place color on the page. Quartz uses the current fill color to paint an image mask.

A mask is a format expression mainly used in formatting user input in forms.

Common examples of this are date input fields that accepts only numbers and format the typed input with the needed characters:

User enters      Field contents
1                1
12               12
123              12/3
1231             12/31
...              ...
12312012         12/31/2012
2841 questions
1
vote
1 answer

Mask a whole animation happening in a UIImageView

I need to mask a whole animation that takes place in a UIImageView. I tried subclassing the UIImageView and doing the masking in its drawRect call but that doesn't get called on every frame of the animation as I expected (it doesn't get called at…
Dimitris
  • 13,480
  • 17
  • 74
  • 94
1
vote
1 answer

RegEx and/or jQuery to allow specific format of string input

I'm trying to allow a certain format in an HTML text box. This format must be 4 sets of numbers 0-99 separated by hyphens. For example, 4-4-4-4 or 4-55-4-55 or 44-55-4-55. I found this qMask jQuery plugin and it gets me 99% of the way to where I…
Buee
  • 33
  • 6
1
vote
1 answer

circle mask effect

I use this code to made a circle mask effect: CGContextRef context = CGBitmapContextCreate(NULL, self.bounds.size.width, self.bounds.size.height, 8, 4 * self.bounds.size.width, CGColorSpaceCreateDeviceRGB(),…
Haven Lin
  • 205
  • 1
  • 9
1
vote
0 answers

(HTML5) Making animations with multiple png sprite, which will overlap with each other

I am very new to html5 game making. Recently I am making a game which includes some animations using png sprite. https://i.stack.imgur.com/y6512.png I have a background and I try to use this sprite to mask it, I was trying to use getImageData() &…
shole
  • 4,046
  • 2
  • 29
  • 69
1
vote
1 answer

Angular UI mask formatted output UNDEFINED

ok, i am using angular ui mask directive. the filter im using is the one for the hours '99:99' what i am doing is grabbing the ng-model of the input box, converting it to a string, looping through the string, after the second place i am adding a ":"…
Misael Tovar
  • 77
  • 1
  • 3
  • 10
1
vote
1 answer

PHP - Htaccess - Comparison two URL in 1 masking, disable one

I have been search through all the questions and browse but haven't found any solution to my case. Hope anyone here could give an answer to my problem. As we know the way we mask an URL, i use this one : RewriteRule ^([^/]+).htm$ index.php?m=$1…
flicher88
  • 35
  • 2
  • 7
1
vote
1 answer

Actionscript: Make a mask follow a line (and "grow")

does anybody know/have some idea how to make a mask follow a line? Basically I have a drawing made with 1px line and I need to gradually mask this shape so it actually looks like it is being drawn. The thing is that I cannot just increase the width…
Fygo
  • 4,555
  • 6
  • 33
  • 47
1
vote
1 answer

Extjs window/iframe getBody mask/unmask

I have a gridpanel with some buttons for each row in the panel. When clicking the buttons, a new Ext.window pops up loading a remote url . Since the remote URL is opened in an iframe, I cannot use Ext.getBody().mask in the parent grid and…
Dan
  • 43
  • 1
  • 7
1
vote
1 answer

bash: Copy last version of a file from a mask list

There is a set of programs in a source folder, but only the most recent version must be copied to the destination USB drive. From Bash Script - Copy latest version of a file in a directory recursively, it shows that my formula would be: f=$(find .…
1
vote
0 answers

PHP image layers using PNG mask

We are trying to implement a PHP server script that will allow the user to change the color on part of a product image. For example, if you had a wooden chair with a red fabric seat, and wanted to change only the fabric color. We had previously…
user45623
  • 621
  • 4
  • 18
1
vote
1 answer

Microsoft MVC Razor - EditorFor and Digitalbush mask not working

I cannot get the mask control to entirely work. A simple mvc editorfor line like this shows fails to mask the input. I'm sending a timespan value to it. @Html.EditorFor(model => model.VXChargeBO.VisitTime) should mask like this _ _ : _ _ Instead…
1
vote
1 answer

jQuery mousemove handler on a masked div

Here is my HTML:
some stuff
div one and two are rectangles of same width and height This is the CSS: #one { position: relative; width: 390px; height: 482px; } #two { position:…
user2013861
  • 43
  • 1
  • 6
1
vote
2 answers

How does CGContextClipToMask work internally?

I am trying to replicate the behavior of CGContextClipToMask on iOS without any luck so far. Does anyone know how CGContextClipToMask works internally? I have read the documentation and it says it simply multiplies the image alpha value by the mask…
jjxtra
  • 20,415
  • 16
  • 100
  • 140
1
vote
3 answers

C# polygon to mask?

I have x, y coordinates of all vertices of a polygon, say (1,1) (20,10) (10,30), how do I generate a mask with all pixels inside the polygon being 1 whereas outside being 0? I know there is a function FillPolygon() in C# that looks pretty much doing…
Nick Tsui
  • 524
  • 2
  • 9
  • 29
1
vote
1 answer
1 2 3
99
100