Ejemplo n.º 1
0
        public static void PrepareCpuBlit(this BrushConfig bc, ImageMeta id)
        {
            half = (bc.Size(false)) / 2;

            var smooth = bc.GetBrushType(true) != BrushTypePixel.Inst;

            if (smooth)
            {
                alphaMode = CircleAlpha;
            }
            else
            {
                alphaMode = NoAlpha;
            }

            blitMode = bc.GetBlitMode(true).BlitFunctionTex2D(id);

            alpha = 1;

            var m = bc.mask;

            r = m.HasFlag(BrushMask.R);
            g = m.HasFlag(BrushMask.G);
            b = m.HasFlag(BrushMask.B);
            a = m.HasFlag(BrushMask.A);

            cSrc = bc.Color;
        }
Ejemplo n.º 2
0
        public static void PrepareCpuBlit(this BrushConfig bc, TextureMeta id)
        {
            half = (bc.Size(false)) / 2;

            var smooth = bc.GetBrushType(true) != BrushTypes.Pixel.Inst;

            if (smooth)
            {
                alphaMode = CircleAlpha;
            }
            else
            {
                alphaMode = NoAlpha;
            }

            blitMode = bc.GetBlitMode(true).BlitFunctionTex2D(id);

            alpha = 1;

            Set(bc.mask);

            cSrc = bc.Color;
        }