public SpotlightEffectProcessor() { CanRenderAtPreviewSize = false; Name = "Spotlight"; Effect = new SpotlightEffect() { Radius = 250, TransitionSize = 0.8 }; m_propertyDescriptions = new Dictionary<string, PropertyDescription>(); m_propertyDescriptions.Add("Radius", new PropertyDescription(0, 1000, 0)); m_propertyDescriptions.Add("TransitionSize", new PropertyDescription(0, 1.0, 0)); AddEditors(); }
public SpotlightEffectProcessor() { CanRenderAtPreviewSize = false; Name = "Spotlight"; Effect = new SpotlightEffect() { Radius = 250, TransitionSize = 0.8 }; m_propertyDescriptions = new Dictionary <string, PropertyDescription>(); m_propertyDescriptions.Add("Radius", new PropertyDescription(0, 1000, 0)); m_propertyDescriptions.Add("TransitionSize", new PropertyDescription(0, 1.0, 0)); AddEditors(); }
async Task <Uri> SpotlightEffect() { using (var source = new StorageFileImageSource(imageStorageFile)) { var inf = await source.GetInfoAsync(); using (var sharpnessEffect = new SpotlightEffect(source) { Position = new Point((inf.ImageSize.Width / 2), (inf.ImageSize.Height / 2)), Radius = (int)((inf.ImageSize.Width / 2) - 100), TransitionSize = 0.8 }) { LastEffect = sharpnessEffect; return(await SaveToImage()); } } }