About convert dwg to png background and line color
Posted: 24 May 2017, 10:58
Hi, I try convert dwg to png,
sample code:
the result show white background and black line as follows
dwg file in DWG TrueView show black background and white line as follows
I want to export png that all colors are same as show in DWG TrueView
I try add
the result png background color is black, and line is still black.
how do I export png that all colors as same as dwg in DWG TrueView?
is CAD.NET auto change line color according to background color?
sample code:
Code: Select all
CADImage cadImage = CADImage.CreateImageByExtension(sourceFile);
cadImage.LoadFromFile(sourceFile);
DRect boundaryRectangle = new DRect(left, top, width, height);
Rectangle rect = new Rectangle(left, top, width, height);
cadImage.SaveToFile(outFileName, ImageFormat.Png, boundaryRectangle, rect);
I try add
Code: Select all
cadImage.BackgroundColor = Color.Black;
how do I export png that all colors as same as dwg in DWG TrueView?
is CAD.NET auto change line color according to background color?