Page 1 of 1
Save to image
Posted: 02 Jul 2009, 13:20
by Cyril
Hello
I need to save a dwg file to image. In your demo you use the rasterSizeForm. But i need to save image directly to a file with the maximum recommended size.
How do you calculate this size ?
Thanks
Re: Save to image
Posted: 03 Jul 2009, 16:43
by support
Hello.
Maximum recommended size calculated heuristically. If I understand correctly, you want to save raster file without Size setting dialog, i.e. directly. To do such a thing you need to modify demo (for example Editor) code like it shown on screenshot:

- save_without_dialog.jpg (203.7 KiB) Viewed 16241 times
On screenshot maximum size set in integer values in pixels. You will need to write your method to calculate maximum recommended size, because you can't access our realization without rasterSizeForm.
Alexander.
Re: Save to image
Posted: 07 Jul 2009, 11:37
by Cyril
Thank you for your reply.
You write that maximum recommended size is calculated heuristically. I understand but i think that this size is calculated with a function which depends a specific data, like cadPictBox.VirtualSize or else.
Is it right ?
Cyril
Re: Save to image
Posted: 08 Jul 2009, 18:24
by support
Yes, maximum recommended size calculated with a function that uses some specific data. These data is not cadPictBox.VirtualSize and you can't access it from your application. Because of this you will need to write your method. But you can use in your method CADImage.AbsHeight and CADImage.AbsWidth properties. Using of CADPictureBox class is incorrect, because it represents advanced PictureBox object with the scroll bars.
Alexander.