ZOOM BACKGROUND IMAGE

1
archana_saini
2/24/2015 1:02 PM

Hi

Sorry for the stupid Question.
But, Is it possible to Zoom-UnZoom the Background image of the cadEditControl along with the Model?

Kindly let me know in any case.

Thanks & Regards
Archana

Wout
2/26/2015 9:59 PM

Hi,

The CadEditControl by itself has no background image, it's just a white background. Did you put any image there? You will need to provide some more information about this for me to consider this.

- Wout

archana_saini
2/27/2015 5:25 AM

Hi Wout,

Yes I added background image to it.
Here is the Code:

Bitmap bitmap = (Bitmap)Image.FromFile(@"D:\CAD.JPG");
ActiveCadEditControl.BackgroundImage = bitmap;
ActiveCadEditControl.BackgroundImageLayout = ImageLayout.Stretch;


Thanks & Regards
Archana Saini

Wout
2/27/2015 9:21 AM

Having the background image is not a great idea. Theoretically you could possibly transform it along with the CAD drawing. But it won't look great when you zoom in a lot, as you'll see the pixels. Functionally having the image there doesn't seem to have any value, as the initial position is just covering the Control, but has no relation to the drawing.

If you really must have a background image, you will have to draw it yourself in the OnPaint method of the Control and position it yourself.

- Wout

1