←选择平台

SharpEneffect类

概括
增加或降低该图像的清晰度。
句法
C#
VB
C ++
上市班级SharpEneftect:Shadereffect
上市班级Sharpenefect继承system.windows.media.effects.shadereffect工具system.windows.media.animation.ianimatable
上市裁判课SharpEneffect:上市system.windows.media.effects.shadereffect,system.windows.media.animation.ianimatable
评论

负清晰度值降低了图像的清晰度。指定-1000的最低清晰度。正清晰度值会增加清晰度。指定+1000,以最大程度的清晰度。

例子
C#
VB
使用LeadTools;使用Leadtools.codecs;使用LeadTools.imageProcessing;使用leadtools.windows.controls;使用Leadtools.windows.media;使用leadtools.windows.media.effects;班级SharpEneffectexamplewindow:窗口{上市SharpEneffectexampleWindow(){Stackpanel sp =新的stackpanel();content = sp;ImageViewer theViewer =新的ImageViewer();theviewer.horizo​​ntalalailmignment = hixontalAlignment.center;theviewer.verticalAlignment = verticalAilignment.top;theviewer.imageHorizo​​ntalAlignment = hixontalAlignment.left;theviewer.imageverticalAlignment =垂直词法; top;sp.Children.Add(viewer);//创建滑块TextBlock TB =新的textblock();tb.Horizo​​ntalAlignment = hixontalAlignment.Center;tb.text =“数量:”;sp.Children.Add(TB);滑块theslider =新的slider();theslider. -minimine = -10.0;theslider.maximum = 10.0;theslider.width = 400;theslider.Erientation = entientation.horizo​​ntal;theslider.issnaptotickenabled =真的;theslider.tickplacement = system.windows.controls.primitives.tickplacement.bottomright;theslider.tickfrequency = 0.1;theslider.autotooltippRecision = 2;theslider.autotooltipplacement = system.windows.controls.primitives.autotooltipplacement.bottomright;sp.Children.Add(Theslider);//将图像加载到查看器中theviewer.source =新的bitmapimage(新的uri(system.io.path.combine(lade_vars.imagesdir),“ Cannon.jpg”));//创建效果SharpEnefect效果=新的SharpEneffect();效果。Amount= 1.0;theviewer.imageEffect =效果;//绑定属性绑定结合=新的捆绑();bind.source =效果;bind.updatesourcetrigger = updatesourcetrigger.propertychanged;bind.path =新的propertypath(“数量”);theslider.setBinding(slider.valueproperty,bind);标题=“使用SharpEnefect”;}}静止的班级LEAD_VARS{上市const细绳ImagesDir =@“ C:\ LeadTools21 \ Resources \ Images”;}
进口LeadTools进口Leadtools.codecs进口LeadTools.imageProcessing进口Leadtools.windows.controls进口leadtools.windows.media进口leadtools.windows.media.effects班级SharpEneffectexamplewindow继承窗户上市新的()暗淡sp作为新的stackpanel()content = sp暗淡观众作为新的ImageViewer()theviewer.horizo​​ntalalailmignment = hixontalAlignment.centertheviewer.verticalAlignment =垂直安排theviewer.imagehorizo​​ntalalailmignment = hixontalAlignment.Lefttheviewer.imageVerticalAlignment =垂直词法sp.Children.Add(浏览器)'创建滑块暗淡TB作为新的textblock()tb.Horizo​​ntalAlignment = HixontalAlignment.Centertb.text =“数量:”sp.Children.Add(TB)暗淡theslider作为新的slider()theslider.minimine = -10.0theslider.maximum = 10.0theslider.width = 400theslider.Erientation = eartientation.horizo​​ntaltheslider.issnaptotickenabled =真的theslider.tickplacement = system.windows.controls.primitives.tickplacement.bottomrighttheslider.tickfrequency = 0.1theslider.autotooltippRecision = 2theslider.autotooltipplacement = system.windows.controls.primitives.autotooltipplacement.bottomrightsp.Children.Add(Theslider)'将图像加载到查看器中theviewer.source =新的bitmapimage(新的uri(system.io.path.combine(lade_vars.imagesdir),“ Cannon.jpg”)))'创造效果暗淡影响作为新的SharpEneffect()效果。Amount= 1.0theviewer.imageEffect =效果'结合属性暗淡绑定作为新的捆绑()bind.source =效果bind.updatesourcetrigger = updatesourcetrigger.propertychangedbind.path =新的propertypath(“数量”theslider.setbinding(slider.valueproperty,绑定)标题=“使用SharpEnefect”结尾结尾班级上市简直是可靠的班级LEAD_VARS上市constImagesDir作为细绳=“ C:\ LeadTools21 \ Resources \ Images”结尾班级
要求

目标平台

LeadTools.Windows.Media.Feffects组件
188金宝搏的网址客服|支持|联系我们|知识产权通知
©1991-2021Lead Technologies,Inc。版权所有。