c#
VB
c++
公共类IntensityDetectEffect: ShaderEffect
公共类IntensityDetectEffect
继承了System.Windows.Media.Effects.ShaderEffect
实现了System.Windows.Media.Animation.IAnimatable
公共ref类IntensityDetectEffect:公共System.Windows.Media.Effects.ShaderEffect, System.Windows.Media.Animation.IAnimatable
使用Leadtools;
使用Leadtools.Codecs;
使用Leadtools.ImageProcessing;
使用Leadtools.Windows.Controls;
使用Leadtools.Windows.Media;
使用Leadtools.Windows.Media.Effects;
类IntensityDetectEffectExampleWindow:窗口
{
公共IntensityDetectEffectExampleWindow ()
{
StackPanel sp =新StackPanel ();
内容= sp;
ImageViewer theViewer =新imageview ();
景观。水平Alignment = HorizontalAlignment.Center;
景观。verticalalign = verticalalign . top;
景观。imagehorizontalalign = horizontalalign . left;
景观。imageverticalalign = verticalalign . top;
sp.Children.Add(景观);
//创建滑动条
TextBlock tb =新TextBlock ();
结核病。horizontalalign = horizontalalign . center;
结核病。文本=强度:“;
sp.Children.Add(结核病);
滑动条=新滑块();
theSlider。最小值= 0.0;
theSlider。最大值= 256.0;
theSlider。宽度= 400;
theSlider。方向=方向。水平;
theSlider。IsSnapToTickEnabled =真正的;
theSlider。TickPlacement = system . windows . controls . primitives . tickplace . bottom right;
theSlider。TickFrequency = 0.1;
theSlider。AutoToolTipPrecision = 2;
theSlider。AutoToolTipPlacement = system . windows . controls . primitives . autotooltipplace . bottom right;
sp.Children.Add (theSlider);
//加载图像到查看器
景观。源=新BitmapImage (新Uri (System.IO.Path.Combine (LEAD_VARS.ImagesDir“Cannon.jpg”)));
//创建效果
IntensityDetectEffect effect =新IntensityDetectEffect ();
的效果。强度= 128.5;
景观。ImageEffect =效果;
//绑定属性
绑定绑定=新绑定();
绑定。来源=效果;
绑定。UpdateSourceTrigger = UpdateSourceTrigger. propertychanged;
绑定。路径=新PropertyPath (“强度”);
theSlider.SetBinding(滑块。ValueProperty,绑定);
Title =“使用IntensityDetectEffect”;
}
}
静态类LEAD_VARS
{
公共常量字符串ImagesDir =@“C: \ LEADTOOLS21 \ Resources \图片”;
}
进口Leadtools
进口Leadtools。编解码器
进口Leadtools。ImageProcessing
进口Leadtools.Windows.Controls
进口Leadtools.Windows.Media
进口Leadtools.Windows.Media.Effects
类IntensityDetectEffectExampleWindow
继承了窗口
公共子新()
昏暗的sp作为新StackPanel ()
内容= sp
昏暗的景观作为新imageview ()
景观。水平Alignment = HorizontalAlignment.Center
景观。VerticalAlignment = VerticalAlignment。前
景观。ImageHorizontalAlignment = HorizontalAlignment。左
景观。ImageVerticalAlignment =垂直对齐。前
sp.Children.Add(景观)
创建滑块
昏暗的结核病作为新TextBlock ()
结核病。HorizontalAlignment = HorizontalAlignment。中心
结核病。文本=强度:“
sp.Children.Add (tb)
昏暗的theSlider作为新滑块()
theSlider。最小值= 0.0
theSlider。最大值= 256.0
theSlider。宽度= 400
theSlider。方向=方向。水平
theSlider。IsSnapToTickEnabled =真正的
theSlider。TickPlacement = system . windows . controls . primitives . tickplace . bottom right
theSlider。TickFrequency = 0.1
theSlider。AutoToolTipPrecision = 2
theSlider。AutoToolTipPlacement = system . windows . controls . primitives . autotooltipplace . bottom right
sp.Children.Add (theSlider)
’将图像加载到查看器中
景观。源=新BitmapImage (新Uri (System.IO.Path.Combine (LEAD_VARS.ImagesDir“Cannon.jpg”)))
创造效果
昏暗的效果作为新IntensityDetectEffect ()
的效果。强度= 128.5
景观。ImageEffect =效果
绑定属性
昏暗的绑定作为新绑定()
绑定。来源=效果
绑定。UpdateSourceTrigger = UpdateSourceTrigger。propertychange
绑定。路径=新PropertyPath (“强度”)
theSlider.SetBinding(滑块。ValueProperty绑定)
Title =“使用IntensityDetectEffect”
结束子
结束类
公共NotInheritable类LEAD_VARS
公共常量ImagesDir作为字符串=“C: \ LEADTOOLS21 \ Resources \图片”
结束类
帮助收藏
光栅net|C API|c++类库|HTML5 JavaScript
文档net|C API|c++类库|HTML5 JavaScript
医疗net|C API|c++类库|HTML5 JavaScript
医疗网络查看器net
188宝金博怎么下载
支持的平台上
.NET、Java、Android和iOS/macOS程序集
C API/ c++类库
HTML5 JavaScript库
您的邮件已发送给技术支持!应该有人联系!如果你的事情很紧急,请回来聊天。
聊天时间:
周一至周五,美国东部时间上午8:30至下午6:00
感谢您的反馈!
请再次填写表格,开始新的聊天。
所有代理目前都离线。
聊天时间:
星期一至星期五
美国东部时间上午8:30 -下午6点
如需与我们联系,请填写此表格,我们将通过电子邮件与您联系。