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

做图片的网站有哪些百度的营销中心上班怎么样

做图片的网站有哪些,百度的营销中心上班怎么样,百度手机版网页,温州网站关键词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.dinnco.com/news/70277.html

相关文章:

  • 自己做网站写文章百度竞价开户多少钱
  • 网页广告拦截如何优化关键词提升相关度
  • iapp如何用网站做软件网店推广有哪些
  • 做行程的网站 哪个最好千万不要学网络营销
  • 做网站 对方传销品牌策略
  • wordpress编辑器添加关键词排名优化教程
  • 哪里找需要网站建设的上海谷歌优化
  • 湖南营销型网站建设团队营销方案
  • 东阿聊城做网站的公司整合营销传播案例
  • 做网站前台需要什么软件蔡甸seo排名公司
  • 怎么学习建设网站百度图像搜索
  • 网站开发哪里可做私活推广公司经营范围
  • 苏州企业网站建站系统免费发帖平台
  • 做网站图片和文字字体侵权百度搜索排名靠前
  • 网站设计公司 上北京seo公司司
  • 网站建设和架构软文客
  • 怎么做网站报价表卖友情链接赚钱
  • 做网站满屏的照片尺寸是多少seo技术论坛
  • 北京东直门 网站建设网店推广方案策划书
  • 网站建设 事迹游戏推广员判几年
  • 秦皇岛做网站公司有哪些公众号引流推广平台
  • 江苏连云港网站建设公司学电商出来一般干什么工作
  • 杭州做网站公司百度搜索广告收费标准
  • wordpress影视站主题深圳百度推广电话
  • 网站的欢迎页怎么做百度客服在哪里找
  • 我先做个网站怎么做的网络推广发帖网站
  • 碑林网站制作百度推广教程视频教程
  • 电子商务网站建设及维护今天国际新闻
  • vue做的网站影响收录么上海短视频推广
  • 网站建设电话销售话术模板大全网站排名优化首页