Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Dec 07, 2011 01:36 AM by renameus1234
Dec 07, 2011 01:36 AM|LINK
Is there anyway to retrieve a "System.Drawing.Graphics" object that's already instantiated withing an ASPX (page, request, etc)?
Not sure if it's entirely relevant, but it seems the usual method is to get "Graphics" from some call of "Graphics.From*".
Bitmap bmp = new Bitmap(1,1);
Graphics gfx = Graphics.FromImage(bmp);
However, since the size of the string isn't known until a call to "Graphics.MeasureString" it would require to then throw away the first "Bitmap" before creating a new one. Is this accepted practice in .Net? Or, read above, for my "thought".