Пример #1
0
 protected override sd.Brush Create(sd.RenderTarget target)
 {
     return(new sd.LinearGradientBrush(
                target,
                new sd.LinearGradientBrushProperties
     {
         StartPoint = StartPoint.ToDx(),
         EndPoint = EndPoint.ToDx()
     },
                new sd.GradientStopCollection(GraphicsHandler.CurrentRenderTarget, new[] {
         new sd.GradientStop {
             Color = StartColor.ToDx(), Position = 0f
         },
         new sd.GradientStop {
             Color = EndColor.ToDx(), Position = 1f
         }
     }, WrapMode.ToDx())
                ));
 }
 protected override sd.Brush Create(sd.RenderTarget target)
 {
     return(new sd.RadialGradientBrush(
                target,
                new sd.RadialGradientBrushProperties
     {
         Center = Center.ToDx(),
         GradientOriginOffset = (GradientOrigin - Center).ToDx(),
         RadiusX = Radius.Width,
         RadiusY = Radius.Height
     },
                new sd.GradientStopCollection(GraphicsHandler.CurrentRenderTarget, new[] {
         new sd.GradientStop {
             Color = StartColor.ToDx(), Position = 0f
         },
         new sd.GradientStop {
             Color = EndColor.ToDx(), Position = 1f
         }
     }, WrapMode.ToDx())
                ));
 }