乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
查看: 87|回复: 7

[讨论][求助]能否在cad中显示内存中的图像?

[复制链接]

14

主题

49

帖子

1

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
105
发表于 2010-8-27 17:24:00 | 显示全部楼层 |阅读模式
一般CAD中插入栅格图像都是需要设置路径的,直接操作(“插入”->“光栅图像参照”)或者用代码实现(RastImage、RasterImageDef),
都需要指定路径,然后调用硬盘上对应用的图像文件。
如果在程序代码中自己生成了一个图像,数据存在数组里面了,没有保存在硬盘上,只是在内存中,这样的图像能不能在CAD中显示出来呢?难道必须
先存到硬盘再调用?这样会很慢。。。
回复

使用道具 举报

72

主题

2726

帖子

9

银币

社区元老

Rank: 75Rank: 75Rank: 75

铜币
3014
发表于 2010-8-27 18:36:00 | 显示全部楼层
RasterImageDef.SetImage Method
回复

使用道具 举报

14

主题

49

帖子

1

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
105
发表于 2010-8-27 19:05:00 | 显示全部楼层
你好,飞狐
SetImage(IntPtr image, IntPtr fileDescription, bool modifyDatabase);
中的IntPtr fileDescription表示是什么呢?文件描述?这个参数如何设置呢?
IntPtr image应该是图像数据的句柄了。。。
回复

使用道具 举报

72

主题

2726

帖子

9

银币

社区元老

Rank: 75Rank: 75Rank: 75

铜币
3014
发表于 2010-8-27 19:10:00 | 显示全部楼层
文档里的解释

Directly specifies an in-memory Atil.Image or a custom Atil.FileReadDescriptor to be used. Either image or fileDescription can be null, but not both. Copies of the Atil.Image and Atil.FileReadDescriptor are retained by the RasterImageDef, so the caller's copy of these objects may be deleted at any time.
This function is intended for use by raster editing application developers.
The Loaded status must be false when this function is called. It can be used to construct an RasterImageDef object in lieu of calling ActiveFileName.
If image is not null and is valid, the "loaded" status is set true. Otherwise, "loaded" status is set to false. If image is null, then fileDescription must be a valid read or write Atil.FileReadDescriptor from which an image can be read on demand.
If fileDescription is not null and is valid, resolution and file type information is extracted from it. If fileDescription has a valid file path, it is used as the "active path." Otherwise, "active path" is set to the null string.
If modifyDatabase is true, undo recording will be done for changes made to the RasterImageDef object.
Use ImageModified and the RasterImageDefReactor mechanism to be notified of attempts to delete this image. Otherwise, the user may be able to Unload or Reload the image through the user interface, possibly losing image data that hasn't been saved to disk.
回复

使用道具 举报

14

主题

49

帖子

1

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
105
发表于 2010-8-27 21:06:00 | 显示全部楼层
汗一个。。。请问在什么“文档”查到的?以后自己也学着用这些文档,多谢!
回复

使用道具 举报

72

主题

2726

帖子

9

银币

社区元老

Rank: 75Rank: 75Rank: 75

铜币
3014
发表于 2010-8-27 22:46:00 | 显示全部楼层
下载官方的ObjectArx Sdk
解压后的docs目录下
回复

使用道具 举报

14

主题

49

帖子

1

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
105
发表于 2010-9-7 11:31:00 | 显示全部楼层
这个问题还是没有解决。。。
在Autodesk论坛里面提问,有人回答的:

意思大概是说不行,不能插入非文件(file)形式的图像,后面又说了反应器(reactor),不太懂。。。不知道什么意思,能说说吗?
~~~~~~~~~~~~~
不知道到底能不能实现。SetImage()试了试,总调试不过,不知道怎么用,苦恼。。。
回复

使用道具 举报

6

主题

30

帖子

4

银币

初露锋芒

Rank: 3Rank: 3Rank: 3

铜币
54
发表于 2011-9-28 21:23:00 | 显示全部楼层
,我也有同样的疑惑,不知道楼主此问题解决了否?
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-15 17:26 , Processed in 3.103695 second(s), 69 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表