Пример #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;
         }
     }
 }
Пример #3
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);
            }
        }
Пример #4
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;
                    }
                }
            }
Пример #5
0
 public BitmapLayerProperties(BitmapLayerProperties cloneMe)
 {
     this.blendOp = cloneMe.blendOp;
     this.opacity = -1;
 }
Пример #6
0
 public BitmapLayerProperties(UserBlendOp blendOp)
 {
     this.blendOp = blendOp;
     this.opacity = -1;
 }