create loading mask
@return
961118
@Override
    protected View createOverlayView() {
        LinearLayout ll = new LinearLayout(getContext());
        ll.setLayoutParams(new FrameLayout.LayoutParams(FrameLayout.LayoutParams.MATCH_PARENT,FrameLayout.LayoutParams.MATCH_PARENT));
        ll.setGravity(Gravity.CENTER);
        View progressBar = createProgressBar();
        ll.addView(progressBar);
        return ll;
    }
388887
protected NodeData createBlockStyle()
    {
        NodeData ret = CSSFactory.createNodeData();
        TermFactory tf = CSSFactory.getTermFactory();
        ret.push(createDeclaration("display", tf.createIdent("block")));
        return ret;
    }
1224746
protected function getMask()
    {
        if (!isset($this->mask)) {
            if (!$this->isMasked()) {
                throw new FrameException('Cannot get mask: frame is not masked');
            }
            $this->mask = substr($this->buffer, $this->getMaskOffset(), $this->getMaskSize());
        }
        return $this->mask;
    }
750446
function(_mask) {
      var raw = [];
      for(var i = 0, l = this.length; i < l; i++) {
        raw.push(this[i].$encode(_mask));
      }

      this.$dispatch('before-render-many', [raw]);
      return raw;
    }
818427
function(image) {
        var maskWidth = this._getMaskX(image.width);
        var maskHeight = this._getMaskY(image.height);
        var buf = this._getResizedImageBuffer(image, maskWidth, maskHeight);
        var mask = new Array(maskWidth * maskHeight);
        for (var y = 0; y < maskHeight; y++) {
            for (var x = 0; x < maskWidth; x++) {
                var idx = (y * maskWidth + x);
                var filled = this._checkFilledPixel(buf, idx);
                mask[idx] = filled ? 1 : 0;
            }
        }
        return mask;
    }
967432
private function generateMaskNo($maskNo, $width, $frame)
    {
        $bitMask = array_fill(0, $width, array_fill(0, $width, 0));

        for($y=0; $y<$width; $y++) {
            for($x=0; $x<$width; $x++) {
                if(ord($frame[$y][$x]) & 0x80) {
                    $bitMask[$y][$x] = 0;
                } else {
                    $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y);
                    $bitMask[$y][$x] = ($maskFunc == 0)?1:0;
                }

            }
        }

        return $bitMask;
    }
816922
public File mask(File imgFile, MaskInfo maskInfo) {

        File maskedImg = new File(imgFile.getParent(), EvidenceDir.toMaskSsName(imgFile.getName()));

        try {
            BufferedImage bi = ImageIO.read(imgFile);
            Graphics2D g2d = bi.createGraphics();
            g2d.setPaint(Color.BLACK);

            List<ElementPosition> posStyles = maskInfo.getMaskInfoAsMap().get(imgFile.getName());

            for (ElementPosition elementPosition : posStyles) {

                int posX = elementPosition.getX();
                int posY = elementPosition.getY();
                int width = elementPosition.getW();
                int height = elementPosition.getH();
                g2d.fillRect(posX, posY, width, height);

                ImageIO.write(bi, "png", maskedImg);

            }

            LOG.info("mask.generate", maskedImg.getPath());

        } catch (IOException e) {
            LOG.error("mask.error", e);
        }

        return maskedImg;
    }
537172
protected Node getMask() {
        double borderWidth = ripplerPane.getBorder() != null ? ripplerPane.getBorder().getInsets().getTop() : 0;
        Bounds bounds = control.getBoundsInParent();
        double width = control.getLayoutBounds().getWidth();
        double height = control.getLayoutBounds().getHeight();
        double diffMinX = Math.abs(control.getBoundsInLocal().getMinX() - control.getLayoutBounds().getMinX());
        double diffMinY = Math.abs(control.getBoundsInLocal().getMinY() - control.getLayoutBounds().getMinY());
        double diffMaxX = Math.abs(control.getBoundsInLocal().getMaxX() - control.getLayoutBounds().getMaxX());
        double diffMaxY = Math.abs(control.getBoundsInLocal().getMaxY() - control.getLayoutBounds().getMaxY());
        Node mask;
        switch (getMaskType()) {
            case RECT:
                mask = new Rectangle(bounds.getMinX() + diffMinX - snappedLeftInset(),
                    bounds.getMinY() + diffMinY - snappedTopInset(),
                    width - 2 * borderWidth,
                    height - 2 * borderWidth); // -0.1 to prevent resizing the anchor pane
                break;
            case CIRCLE:
                double radius = Math.min((width / 2) - 2 * borderWidth, (height / 2) - 2 * borderWidth);
                mask = new Circle((bounds.getMinX() + diffMinX + bounds.getMaxX() - diffMaxX) / 2 - snappedLeftInset(),
                    (bounds.getMinY() + diffMinY + bounds.getMaxY() - diffMaxY) / 2 - snappedTopInset(),
                    radius,
                    Color.BLUE);
                break;
            case FIT:
                mask = new Region();
                if(control instanceof Shape){
                    ((Region) mask).setShape((Shape) control);
                }else if(control instanceof Region){
                    ((Region) mask).setShape(((Region) control).getShape());
                    JFXNodeUtils.updateBackground(((Region) control).getBackground(), (Region) mask);
                }
                mask.resize(width, height);
                mask.relocate(bounds.getMinX() + diffMinX, bounds.getMinY() + diffMinY);
                break;
            default:
                mask = new Rectangle(bounds.getMinX() + diffMinX - snappedLeftInset(),
                    bounds.getMinY() + diffMinY - snappedTopInset(),
                    width - 2 * borderWidth,
                    height - 2 * borderWidth); // -0.1 to prevent resizing the anchor pane
                break;
        }
        return mask;
    }
772123
public void setMasks(String masks) {
        String[] subMasks = masks.split(separate);
        this.masks = new String[subMasks.length];
        for (int i = 0; i < subMasks.length; ++i)
            this.masks[i] = subMasks[i];
    }
133184
def mask(self):
        '''
        

        '''

        return np.array(list(set(np.concatenate([self.outmask, self.badmask,
                        self.transitmask, self.nanmask]))), dtype=int)
344346
def _set_mask(self, mask):
        
        self.mask = mask.copy()
        if self.h5 is not None:
            if 'mask' in self.h5:
                self.h5.pop('mask')
            self.h5.create_dataset('mask', mask.shape, dtype=self.mask.dtype, data=mask, compression="gzip", shuffle=True)
56762
protected function createMask($maskPath, $width, $height)
    {
        $mask = $this->imagine->open($maskPath);
        $mask->resize(
            new Box(
                $width ?: 1,
                $height ?: 1
            )
        );

        return $mask;
    }
643882
public static MaskFormat maskFormat(final String mask)
    {
        MaskFormat maskFmt = context.get().getMaskFormat();
        maskFmt.setMask(mask);
        return maskFmt;
    }
872382
public int createTextureObject() {
        int[] textures = new int[1];
        GLES20.glGenTextures(1, textures, 0);
        GlUtil.checkGlError("glGenTextures");

        int texId = textures[0];
        GLES20.glBindTexture(mTextureTarget, texId);
        GlUtil.checkGlError("glBindTexture " + texId);

        GLES20.glTexParameterf(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_MIN_FILTER,
                GLES20.GL_NEAREST);
        GLES20.glTexParameterf(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_MAG_FILTER,
                GLES20.GL_LINEAR);
        GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_WRAP_S,
                GLES20.GL_CLAMP_TO_EDGE);
        GLES20.glTexParameteri(GLES11Ext.GL_TEXTURE_EXTERNAL_OES, GLES20.GL_TEXTURE_WRAP_T,
                GLES20.GL_CLAMP_TO_EDGE);
        GlUtil.checkGlError("glTexParameter");

        return texId;
    }
624277
def _create_loading_page(self):
        """"""
        loading_template = Template(LOADING)
        loading_img = get_image_path('loading_sprites.png')
        if os.name == 'nt':
            loading_img = loading_img.replace('\\', '/')
        message = _("Connecting to kernel...")
        page = loading_template.substitute(css_path=self.css_path,
                                           loading_img=loading_img,
                                           message=message)
        return page
1182755
public void setMaskVisible(boolean isMaskVisible) {
		this.isMaskVisible = isMaskVisible;
		if (isMaskVisible) {
			if (maskFormatter == null) {
				try {
					maskFormatter = new MaskFormatter(createMaskFromDatePattern(datePattern));
					maskFormatter.setPlaceholderCharacter(this.placeholder);
					maskFormatter.install(this);
				} catch (ParseException e) {
					e.printStackTrace();
				}
			}
		}
	}
453159
protected function getMask()
    {

        $w = imagesx($this->driver->getResource());
        $h = imagesy($this->driver->getResource());
        $m = min($w, $h);

        $bg = imagecreatetruecolor($w, $h);

        $bg = $this->drawCirlce($bg, $w, $h, 255, 255, 255, 0);

        return $bg;
    }