/// <inheritdoc/>
        public void PushBitmapBlendMode(BitmapBlendingMode blendingMode)
        {
            var next = NextDrawAs <BitmapBlendModeNode>();

            if (next == null || !next.Item.Equals(blendingMode))
            {
                Add(new BitmapBlendModeNode(blendingMode));
            }
            else
            {
                ++_drawOperationindex;
            }
        }
        public static SKBlendMode ToSKBlendMode(this BitmapBlendingMode blendingMode)
        {
            switch (blendingMode)
            {
            case BitmapBlendingMode.SourceOver:
                return(SKBlendMode.SrcOver);

            case BitmapBlendingMode.Source:
                return(SKBlendMode.Src);

            case BitmapBlendingMode.SourceIn:
                return(SKBlendMode.SrcIn);

            case BitmapBlendingMode.SourceOut:
                return(SKBlendMode.SrcOut);

            case BitmapBlendingMode.SourceAtop:
                return(SKBlendMode.SrcATop);

            case BitmapBlendingMode.Destination:
                return(SKBlendMode.Dst);

            case BitmapBlendingMode.DestinationIn:
                return(SKBlendMode.DstIn);

            case BitmapBlendingMode.DestinationOut:
                return(SKBlendMode.DstOut);

            case BitmapBlendingMode.DestinationOver:
                return(SKBlendMode.DstOver);

            case BitmapBlendingMode.DestinationAtop:
                return(SKBlendMode.DstATop);

            case BitmapBlendingMode.Xor:
                return(SKBlendMode.Xor);

            case BitmapBlendingMode.Plus:
                return(SKBlendMode.Plus);

            default:
                throw new ArgumentOutOfRangeException(nameof(blendingMode), blendingMode, null);
            }
        }
Example #3
0
        public static CompositeMode GetCompositeMode(BitmapBlendingMode blendingMode)
        {
            switch (blendingMode)
            {
            case BitmapBlendingMode.SourceIn:
                return(CompositeMode.SourceIn);

            case BitmapBlendingMode.SourceOut:
                return(CompositeMode.SourceOut);

            case BitmapBlendingMode.SourceOver:
                return(CompositeMode.SourceOver);

            case BitmapBlendingMode.SourceAtop:
                return(CompositeMode.SourceAtop);

            case BitmapBlendingMode.DestinationIn:
                return(CompositeMode.DestinationIn);

            case BitmapBlendingMode.DestinationOut:
                return(CompositeMode.DestinationOut);

            case BitmapBlendingMode.DestinationOver:
                return(CompositeMode.DestinationOver);

            case BitmapBlendingMode.DestinationAtop:
                return(CompositeMode.DestinationAtop);

            case BitmapBlendingMode.Xor:
                return(CompositeMode.Xor);

            case BitmapBlendingMode.Plus:
                return(CompositeMode.Plus);

            default:
                throw new ArgumentOutOfRangeException(nameof(blendingMode), blendingMode, null);
            }
        }
 public void PushBitmapBlendMode(BitmapBlendingMode blendingMode)
 {
 }
Example #5
0
 public void PushBitmapBlendMode(BitmapBlendingMode blendingMode)
 {
     // TODO: Stubs for now
 }
Example #6
0
 /// <inheritdoc />
 public void PopBitmapBlendMode()
 {
     _currentBlendingMode = _blendingModeStack.Pop();
 }
Example #7
0
 /// <inheritdoc />
 public void PushBitmapBlendMode(BitmapBlendingMode blendingMode)
 {
     _blendingModeStack.Push(_currentBlendingMode);
     _currentBlendingMode = blendingMode;
 }
Example #8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="BitmapBlendModeNode"/> class that represents an
 /// <see cref="BitmapBlendingMode"/> push.
 /// </summary>
 /// <param name="bitmapBlend">The <see cref="BitmapBlendingMode"/> to push.</param>
 public BitmapBlendModeNode(BitmapBlendingMode bitmapBlend)
 {
     BlendingMode = bitmapBlend;
 }
Example #9
0
 /// <inheritdoc />
 public void PopBitmapBlendMode()
 {
     CheckLease();
     _currentBlendingMode = _blendingModeStack.Pop();
 }