Save to image

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Cyril
Posts: 4
Joined: 04 May 2009, 12:21

Save to image

Post by Cyril » 02 Jul 2009, 13:20

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

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Save to image

Post by support » 03 Jul 2009, 16:43

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
save_without_dialog.jpg (203.7 KiB) Viewed 16235 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.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Cyril
Posts: 4
Joined: 04 May 2009, 12:21

Re: Save to image

Post by Cyril » 07 Jul 2009, 11:37

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

support
Posts: 3272
Joined: 30 Mar 2005, 11:36
Contact:

Re: Save to image

Post by support » 08 Jul 2009, 18:24

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.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply