-
*Solved* Metafile()
Hi.
Does anyone know how to draw vector-graphics in VB.net?
Right now i use
Code:
Dim pic As New System.Drawing.Bitmap(500, 500, System.Drawing.Imaging.PixelFormat.Format32bppArgb)
Dim gr As System.Drawing.Graphics = System.Drawing.Graphics.FromImage(pic)
but instead of pic beeing a bitmap I need it to be some kind of vector format...
I think the Metafile() is what I should use, but how do I create/use it?
Can I still have the same drawing-functions? (gr.FillRectangle(...) etc.)
-
I simply had to add
Code:
Dim hDC As IntPtr = gr.GetHdc()
Dim m As System.Drawing.Imaging.Metafile = New System.Drawing.Imaging.Metafile(strPicName & "." & strPicFormat, hDC)
gr.ReleaseHdc(hDC)
gr = Graphics.FromImage(m)
I offically LOVE .NET