예제 #1
0
        public static string ToSVG(this Wg.ShadowEffect input)
        {
            double radians = (input.Angle + 180) / 180 * Math.PI;
            string output  = "<feDropShadow dx=\"" + Math.Round(input.Distance * Math.Sin(radians), 4) + "\" dy=\"" + Math.Round(input.Distance * Math.Cos(radians), 4) + "\" stdDeviation=\"" + input.Radius + "\" flood-color=\"" + input.Color.ToSVG() + "\" flood-opacity=\"" + Math.Round(input.Color.A / 255.0, 4) + "\" />" + Environment.NewLine;

            return(output);
        }
예제 #2
0
 public ShadowEffect(ShadowEffect shadowEffect)
 {
     this.Color    = shadowEffect.Color;
     this.Radius   = shadowEffect.Radius;
     this.Angle    = shadowEffect.Angle;
     this.Distance = shadowEffect.Distance;
 }
예제 #3
0
        public static Se.DropShadowEffect ToMediaEffect(this Wg.ShadowEffect input)
        {
            Se.DropShadowEffect output = new Se.DropShadowEffect();
            output.BlurRadius  = input.Radius;
            output.Direction   = input.Angle + 90;
            output.ShadowDepth = input.Distance;

            return(output);
        }
예제 #4
0
파일: Effects.cs 프로젝트: interopxyz/Wind
 public Effects(Effects effects)
 {
     id = Guid.NewGuid().ToString();
     this.hasEffects = effects.hasEffects;
     this.hasBlur    = effects.hasBlur;
     this.blur       = effects.blur;
     this.hasShadow  = effects.hasShadow;
     this.shadow     = effects.shadow;
 }
예제 #5
0
        public static Se.DropShadowBitmapEffect ToMediaBitmapEffect(this Wg.ShadowEffect input)
        {
            Se.DropShadowBitmapEffect output = new Se.DropShadowBitmapEffect();
            output.Color       = input.Color.ToMediaColor();
            output.Opacity     = input.Color.A / 255.0;
            output.Softness    = input.Radius;
            output.Direction   = input.Angle;
            output.ShadowDepth = input.Distance;

            return(output);
        }
예제 #6
0
파일: Effects.cs 프로젝트: interopxyz/Wind
 protected Effects(ShadowEffect shadowEffect)
 {
     id = Guid.NewGuid().ToString();
     this.hasEffects = true;
     this.shadow     = new ShadowEffect(shadowEffect);
 }