Graphics object

Discuss and ask questions about CAD .NET library.

Moderators: SDS, support, admin

Post Reply
Rigor69
Posts: 18
Joined: 05 Oct 2009, 18:31

Graphics object

Post by Rigor69 » 08 Oct 2009, 13:27

Hi there.
I am considering your dll DXFExport for my project.
I have found a problem that may be related to your MetaForm or perhaps its just me misunderstanding the use.
In my project i have a picture that may change dynamically, and in that case it needs to be repainted.
I cannot make the MetaForm.Graphics to paint my nice picture until i call Dispose on it, like in your demo.
But i do not want to Dispose it for every repaint, because then i have to recreate the Metaform and it seems inefficient to do this.
How do you suggest to use it when a form needs to be repainted frequently?

Code: Select all

        
private void frmPage_Paint(object sender, PaintEventArgs e)
        {
            if (mf1 == null) mf1 = new MetaForm(this, EmfType.EmfPlusDual, true);
            Page.Draw(ref mf1.mfGraph);
            mf1.mfGraph.Dispose();               //Here my graphics are actually painted, but i do not want to Dispose it.
        }
Best Regard,

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

Re: Graphics object

Post by support » 12 Oct 2009, 11:05

Hello.
The purpose of DXFExport.dll assembly is export to DXF format. If you need to repaint your form that changes dynamically, use CADImport.dll for that purpose.

Alexander.
Technical Support E-mail: support@cadsofttools.com
Chat support on Skype: cadsofttools.support

Post Reply