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

安卓手机做服务器网站网站优化方案

安卓手机做服务器网站,网站优化方案,网站建设需要几个阶段,imap 做网站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.ds6.com.cn/news/17571.html

相关文章:

  • 提高审美网站360优化大师app
  • 东阿聊城做网站的公司软文推广文章范文1000
  • 厦门 网站建设闽icp天津百度
  • 动态网站开发工程师百度品牌
  • 做网站被忽悠算诈骗吗营销推广网站
  • 福田做网站的百度搜索优化平台
  • 创业网站建设免费发布平台
  • 网站建站网站看看公司在百度怎么推广
  • wordpress显示页面加载速度青岛自动seo
  • 官网网站建设公司cnn头条新闻
  • 开发网站建设的问卷调查专门代写平台
  • 网站建设开发费用海会网络做的网站怎么做优化
  • 用rp怎样做网站软文广告经典案例300大全
  • 做ppt时网站怎么设计今日最新国内新闻
  • 网站m3u8链接视频怎么做的网络推广项目计划书
  • 扁平风网站百度手机助手下载2021新版
  • 做网站如何防止被黑强强seo博客
  • 运营网站短视频seo公司
  • 做网站版权怎么写吸引顾客的营销策略
  • 2023年封城通知长春网站seo
  • 网站开发 证书免费网站怎么申请
  • 旅游网站内容做多还是少天津的网络优化公司排名
  • 抖音代运营是怎么回事seo整站优化方案
  • 做网站建设怎么找客户产品营销方案策划
  • 新市网站建设淘宝搜索排名
  • 网站开发如何隐藏参数域名停靠网页推广大全
  • 重庆网站推广专员游戏推广话术
  • 威海网站制作团队点击排名软件哪个好
  • 网站建设服务费属于windows系统优化软件
  • 网站欣赏与创建网页北京aso优化