c#
VB
objective - c
c++
Java
公共过载子结合(_按值传递矩形作为LeadRect,_按值传递combineMode作为RasterRegionCombineMode_)
(保龄球)combineWithRect:(LeadRect)矩形combineMode:(LTRasterRegionCombineMode)combineMode错误:错误(NSError * *)
公共无效结合(LeadRect矩形,RasterRegionCombineModecombineMode)
矩形
的LeadRect结构相结合RasterRegion。
combineMode
其中的一个RasterRegionCombineMode使用枚举成员描述相结合方法。这是不可能的RasterRegionCombineMode.AndNotImage或RasterRegionCombineMode.AndNotRegion。使用任何一种组合方法会导致一个异常。
有关更多信息,请参考RasterRegionCombineMode。
使用Leadtools;使用Leadtools.Codecs;使用Leadtools.ImageProcessing;公共无效RasterRegionCombineRectExample (){字符串srcFileName = Path.Combine (LEAD_VARS.ImagesDir,“Image1.cmp”);字符串destFileName = Path.Combine (LEAD_VARS.ImagesDir,“Image1_CombineRect.bmp”);使用(RasterCodecs编解码器=新RasterCodecs ()){/ /加载源图像使用(RasterImage图像=编解码器。加载(srcFileName 0 CodecsLoadByteOrder。BgrOrGray 1,1)){/ /添加一个小椭圆区域image.AddEllipseToRegion (零,新LeadRect(0, 0,形象。ImageWidth / 3,形象。ImageHeight / 3), RasterRegionCombineMode.Set);/ /得到该地区RasterRegion地区= image.GetRegion (零);image.MakeRegionEmpty ();/ /创建一个矩形,适合本地区区域LeadRect rc =新LeadRect(0, 0,形象。ImageWidth / 4,形象。ImageHeight / 4);/ /将该地区只包含和矩形之间的区别地区。结合(rc, RasterRegionCombineMode.Xor);/ /设置该区域形象和填充黄色image.SetRegion (零、地区RasterRegionCombineMode.Set);FillCommand cmd =新FillCommand (RasterColor.FromKnownColor (RasterKnownColor.Yellow));cmd.Run(图片);编解码器。保存(图像、destFileName RasterImageFormat。Bmp、24);}}}静态类LEAD_VARS{公共常量字符串ImagesDir =@“C: \ LEADTOOLS21 \ Resources \图片”;}
进口Leadtools进口Leadtools.Codecs进口Leadtools.ImageProcessing公共子RasterRegionCombineRectExample ()昏暗的编解码器作为新RasterCodecs ()昏暗的srcFileName作为字符串= Path.Combine (LEAD_VARS.ImagesDir“Image1.cmp”)昏暗的destFileName作为字符串= Path.Combine (LEAD_VARS.ImagesDir“Image1_CombineRect.bmp”)“加载源图像使用图像作为RasterImage =编解码器。加载(srcFileName 0 CodecsLoadByteOrder。BgrOrGray, 1, 1)“添加一个小椭圆区域image.AddEllipseToRegion (没有什么,新LeadRect(0, 0,形象。ImageWidth \ 3、形象。RasterRegionCombineMode ImageHeight \ 3)。集)这个地区的昏暗的地区作为RasterRegion = image.GetRegion (没有什么)image.MakeRegionEmpty ()“创建一种适合本地区的矩形区域昏暗的钢筋混凝土作为新LeadRect(0, 0,形象。ImageWidth \ 4,形象。ImageHeight \ 4)”结合该地区只包含的区别和矩形地区。结合(rc, RasterRegionCombineMode。Xor)设置这个地区的形象和填充黄色image.SetRegion (没有什么、地区RasterRegionCombineMode。集)昏暗的cmd作为新FillCommand (RasterColor.FromKnownColor (RasterKnownColor.Yellow))cmd.Run(图片)编解码器。保存(图像、destFileName RasterImageFormat。Bmp, 24)结束使用codecs.Dispose ()结束子公共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
医疗Web查看器net
188宝金博怎么下载
支持的平台上
net, Java, Android和iOS / macOS组件
C / c++类库的API
HTML5 JavaScript库
你的邮件已经发送到支持!有人应该联系!如果你的问题是紧急请回到聊天。
聊天时间:
周一——周五,上午6点等
谢谢你的反馈!
请填写表单重新开始一个新的聊天。
所有代理目前离线。
聊天时间:
周一-周五
早上8:30 - 6点
联系我们请填写这张表格,我们将通过电子邮件联系你。
