当前位置: 首页 > news >正文

怎么做网站推广线下wordpress 福利模板

怎么做网站推广线下,wordpress 福利模板,合肥seo整站优化,网站建设 费用1、下载CadLib相关dll文件,主要用到的:WW.dll、WW.Cad.dll、WW.GL.dll 2、程序中引用dll库。 3、创建WPF程序,使用Canvas来加载dwg文件,支持拖动和放大缩小。 4、部分代码: public void Init(string filename) {tr…

1、下载CadLib相关dll文件,主要用到的:WW.dll、WW.Cad.dll、WW.GL.dll

2、程序中引用dll库。

3、创建WPF程序,使用Canvas来加载dwg文件,支持拖动和放大缩小。

4、部分代码:

public void Init(string filename)
{try{string extension = System.IO.Path.GetExtension(filename);if (string.Compare(extension, ".dwg", true) == 0){model = DwgReader.Read(filename);}else{model = DxfReader.Read(filename);}#region calculate the model's bounds to determine a proper dots per inch// The dots per inch value is important because it determines the eventual pen thickness.graphicsConfig = (GraphicsConfig)GraphicsConfig.WhiteBackgroundCorrectForBackColor.Clone();BoundsCalculator boundsCalculator = new BoundsCalculator();if (model.ActiveLayout == null || model.Header.ShowModelSpace){boundsCalculator.GetBounds(model);}else{boundsCalculator.GetBounds(model, model.ActiveLayout);}bounds = boundsCalculator.Bounds;WW.Math.Vector3D delta = bounds.Delta;Size estimatedCanvasSize = new Size(500d, 500d);double estimatedScale = Math.Min(estimatedCanvasSize.Width / delta.X, estimatedCanvasSize.Height / delta.Y);graphicsConfig.DotsPerInch = 100d / estimatedScale;#endregiongraphicsCache = new WireframeGraphics2Cache(false, false);graphicsCache.Config = graphicsConfig;if (model.ActiveLayout == null || model.Header.ShowModelSpace){graphicsCache.CreateDrawables(model, Matrix4D.Identity);}else{graphicsCache.CreateDrawables(model, model.ActiveLayout);}wpfGraphics = new WpfWireframeGraphics3DUsingDrawingVisual();wpfGraphics.Config = graphicsConfig;this.Dispatcher.Invoke(() => {canvas.Children.Add(wpfGraphics.Canvas);canvas.SizeChanged += canvas_SizeChanged;});UpdateWpfGraphics();}catch (Exception ex){this.Dispatcher.Invoke(() => {msg.Text = $"文件加载出现异常,详细:{ex.Message}";});}
}

如果想设置文字颜色,在Read后增加代码:

foreach (DxfEntity entity in model.Entities){// 检查实体是否为DxfText或DxfMTextif (entity is DxfText textEntity){// 设置DxfText的颜色textEntity.Color = EntityColors.Red; // 替换为你想要的颜色}else if (entity is DxfMText mTextEntity){// 设置DxfMText的颜色mTextEntity.Color = EntityColors.Red; // 替换为你想要的颜色}}

5、Demo地址

WPF程序通过CadLib4加载CAD.dwg格式文件资源-CSDN文库

http://www.yayakq.cn/news/788507/

相关文章:

  • 简单个人网站制作手机拍摄720全景软件
  • 亚马逊图书网上商城湘潭优化公司
  • 凤岗做网站手机网站 需求模板
  • 配音秀做素材网站wordpress关闭网站吗
  • 可以做平面设计兼职的网站网站流量如何来
  • 深圳商城网站设计京东企业集团网站建设方案
  • 企业型网站浙江省建筑培训网
  • 湛江建设工程交易中心网站南通自助模板建站
  • 电子商务网站建设客户需求调查表仿站酷网站模板
  • 网站开发课程设计报告一个工程项目的整个流程
  • 深圳宝安大型网站建设公司郑州招聘网
  • 美工外包网站wordpress 小说
  • 网站制作主要公司时尚字体设计网站
  • 岚山建设网站网络营销在我国的发展历程
  • 北京亦庄网站建设公司我想做网站怎么做
  • 长沙企业网站seo新网站没有死链接怎么做
  • 廊坊宣传片制作公司百度seo快速
  • 沈阳专业做网站开发公司wordpress 百度编辑器
  • 什么语言做网站好二级域名和一级域名优化难度
  • 怎样在别人网站做加强链接查询网站whois
  • 广告投放网站平台宝塔做的网站能不能访问
  • 手机网站开发源码在线html5制作网站
  • 中国临海门户网站工程建设邢台有什么网站
  • 长春建站培训班营销型网站制作培训多少钱
  • 比较漂亮的营销型网站驻马店市网站建设
  • 工程建设项目在哪个网站查询网站怎么查看访问量
  • 余杭网站建设joomla wordpress 外贸
  • 国外 家具 网站模板网络制作公司专业制作网站
  • 策划 网站wordpress数据库连接
  • 做的网站进不去后台聚美优品网站建设策划书