Export in PNG and some transformations of entities
Posted: 07 Feb 2012, 17:58
Hello,
I am working on a .NET project and i have some tasks to perform from a DWG file.
First, i have to do an export to a png file in a 1920*1080 resolution.
1/ This code works well for the png generation. But the generated file have a 1780*1080 resolution. I understand the function keeps the proportion, but can i fix it anyway with some white margin ?
2/ Then, i have to put some controls on my png file. So, i take the coordinates from my converter object.
And i use the Box object, with the properties Top and Left.
Do you have some advices on how to do the transformation of the coordinate from a DWG file to PNG file ?
I already perform some transformation, but it's pretty hard to explain here, and maybe some functions do the work in the CAD import.
Thank you !
I am working on a .NET project and i have some tasks to perform from a DWG file.
First, i have to do an export to a png file in a 1920*1080 resolution.
Code: Select all
this._imageCAD = CADImage.CreateImageByExtension(pathToFile);
this._imageCAD.LoadFromFile(pathToFile);
DRect rect = new DRect();
rect.Height = 1080;
rect.Width = 1920;
this._imageCAD.SaveToFile("FondPlan.png", ImageFormat.Png, rect);
2/ Then, i have to put some controls on my png file. So, i take the coordinates from my converter object.
Code: Select all
this._imageCAD.Converter.Entities
Do you have some advices on how to do the transformation of the coordinate from a DWG file to PNG file ?
I already perform some transformation, but it's pretty hard to explain here, and maybe some functions do the work in the CAD import.
Thank you !