Exemplo n.º 1
0
			static CloudsData ()
			{
				Type[] blendOpTypes = UserBlendOps.GetBlendOps ();
				BlendOps = new Dictionary<string, object> ();

				foreach (Type myType in blendOpTypes)
				{
					string blendOpDisplayName = UserBlendOps.GetBlendOpFriendlyName (myType);
					BlendOps.Add (blendOpDisplayName, myType);
				}
	            defaultBlendOp = UserBlendOps.GetBlendOpFriendlyName (UserBlendOps.GetDefaultBlendOp ());
			}
Exemplo n.º 2
0
        private void CompileBlendOp()
        {
            bool isDefaultOp = (properties.blendOp.GetType() == UserBlendOps.GetDefaultBlendOp());

            if (this.Opacity == 255)
            {
                this.compiledBlendOp = properties.blendOp;
            }
            else
            {
                this.compiledBlendOp = properties.blendOp.CreateWithOpacity(this.Opacity);
            }
        }
Exemplo n.º 3
0
        protected override PropertyCollection OnCreatePropertyCollection()
        {
            List <Property> props = new List <Property>();

            props.Add(new Int32Property(PropertyNames.Scale, 250, 2, 1000));
            props.Add(new DoubleProperty(PropertyNames.Power, 0.5, 0.0, 1.0));

            Type[] blendOpTypes        = UserBlendOps.GetBlendOps();
            int    defaultBlendOpIndex = Array.IndexOf(blendOpTypes, UserBlendOps.GetDefaultBlendOp());

            props.Add(new StaticListChoiceProperty(PropertyNames.BlendOp, blendOpTypes, 0, false));

            props.Add(new Int32Property(PropertyNames.Seed, 0, 0, 255));

            return(new PropertyCollection(props));
        }