Wrong font-thickness with „Flicker free drawing"

E

Ernst Sauer

Hello,

I got the example „Flicker free drawing ...“ from
http://www.codeproject.com/KB/GDI-plus/flickerFreeDrawing.aspx

It works almost fine with my graphic,
but the font-thickness is wrong, it is about 1 pixel too big
and it looks like Bold.

string s =String.Format(Gl.culture,"{0}", i);
Font font = new Font("Arial", 8, FontStyle.Regular);
// also tested Font font = new Font("Arial", 8); from the example
SolidBrush brush = new SolidBrush(farbe);
dc.DrawString(s, font, brush, pt1);

Same problem with other fonts.

The original example works fine and uses the same font
and I can't see any difference.

Thanks
Ernst
 
E

Ernst Sauer

Am 27.03.2011 23:18, schrieb Peter Duniho:
There obviously must be some difference. But without a complete code
example, it's impossible to say.

That said, you probably don't need to follow that particular example
anyway. It's useful to understand the basic technique and to see an
implementation. But you can accomplish the same thing simply by setting
the DoubleBuffered property in your Form sub-class's constructor.

Pete

Great, thanks,
it's so easy ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top