Esempio n. 1
0
        //public static Mask operator +(Mask mask1, Mask mask2)
        //{
        //    return mask1 + mask2.maskArray;
        //}
        //public static Mask operator -(Mask mask1, Mask mask2)
        //{
        //    return mask1 + mask2.maskArray;
        //}
        #endregion

        private MaskContainer iterate(Rectangle rect, byte value)
        {
            MaskContainer mask = new MaskContainer(maskArray);

            for (int x = 0; x < height; x++)
            {
                for (int y = 0; y < width; y++)
                {
                    if (MathFunctions.isPointInRectangle(x, y, rect))
                    {
                        mask[x, y] = value;
                    }
                }
            }

            return(mask);
        }
Esempio n. 2
0
 public RectMask(RectangleF rect, RectangleF percentRectangle, string tag) : base(pt => MathFunctions.isPointInRectangle(pt, rect), percentRectangle, tag)
 {
 }