Пример #1
0
        public static UserBlendOp CreateBlendOp(Type opType)
        {
            ConstructorInfo ci = opType.GetConstructor(System.Type.EmptyTypes);
            UserBlendOp     op = (UserBlendOp)ci.Invoke(null);

            return(op);
        }
Пример #2
0
 private void SelectOp(UserBlendOp setOp)
 {
     foreach (object op in blendOpComboBox.Items)
     {
         if (op.ToString() == setOp.ToString())
         {
             blendOpComboBox.SelectedItem = op;
             break;
         }
     }
 }
 private void SelectOp(UserBlendOp setOp)
 {
     foreach (object op in blendOpComboBox.Items)
     {
         if (op.ToString() == setOp.ToString())
         {
             blendOpComboBox.SelectedItem = op;
             break;
         }
     }
 }
Пример #4
0
        public void SetBlendOp(UserBlendOp blendOp)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("BitmapLayer");
            }

            if (blendOp.GetType() != properties.blendOp.GetType())
            {
                OnPropertyChanging(BitmapLayerProperties.BlendOpName);
                properties.blendOp = blendOp;
                compiledBlendOp    = null;
                Invalidate();
                OnPropertyChanged(BitmapLayerProperties.BlendOpName);
            }
        }
Пример #5
0
            public BitmapLayerProperties(SerializationInfo info, StreamingContext context)
            {
                this.blendOp = (UserBlendOp)info.GetValue(blendOpTag, typeof(UserBlendOp));

                // search for 'opacity' and load it if it exists
                this.opacity = -1;

                foreach (SerializationEntry entry in info)
                {
                    if (entry.Name == opacityTag)
                    {
                        this.opacity = (int)((byte)entry.Value);
                        break;
                    }
                }
            }
Пример #6
0
        public void SetBlendOp(UserBlendOp blendOp)
        {
            if (disposed)
            {
                throw new ObjectDisposedException("BitmapLayer");
            }

            if (blendOp.GetType() != properties.blendOp.GetType())
            {
                OnPropertyChanging(BitmapLayerProperties.BlendOpName);
                properties.blendOp = blendOp;
                compiledBlendOp = null;
                Invalidate();
                OnPropertyChanged(BitmapLayerProperties.BlendOpName);
            }
        }
Пример #7
0
            public BitmapLayerProperties(SerializationInfo info, StreamingContext context)
            {
                this.blendOp = (UserBlendOp)info.GetValue(blendOpTag, typeof(UserBlendOp));

                // search for 'opacity' and load it if it exists
                this.opacity = -1;

                foreach (SerializationEntry entry in info)
                {
                    if (entry.Name == opacityTag)
                    {
                        this.opacity = (int)((byte)entry.Value);
                        break;
                    }
                }
            }
Пример #8
0
 public BitmapLayerProperties(BitmapLayerProperties cloneMe)
 {
     this.blendOp = cloneMe.blendOp;
     this.opacity = -1;
 }
Пример #9
0
 public BitmapLayerProperties(UserBlendOp blendOp)
 {
     this.blendOp = blendOp;
     this.opacity = -1;
 }
 protected CloudsEffectConfigToken(CloudsEffectConfigToken copyMe)
     : base(copyMe)
 {
     this.seed = copyMe.seed;
     this.blendOp = copyMe.blendOp;
 }
 public CloudsEffectConfigToken(int scale, int power, int seed, UserBlendOp blendOp)
     : base(scale, power)
 {
     this.seed = seed;
     this.blendOp = blendOp;
 }
Пример #12
0
 public BitmapLayerProperties(BitmapLayerProperties cloneMe)
 {
     this.blendOp = cloneMe.blendOp;
     this.opacity = -1;
 }
Пример #13
0
 public BitmapLayerProperties(UserBlendOp blendOp)
 {
     this.blendOp = blendOp;
     this.opacity = -1;
 }