c# - How to draw moving text with GDI+ -


the task draw moving text on black background (for example, moving number) .net gdi+. other elements may present on background, isn't possible fill area black , draw string in new position.

my current code follows:

graphics g = this.creategraphics(); // drawing string font myfont = new font("fixedsys", 10); g.drawstring("1", myfont, brushes.gray, 100, 100); // erasing string g.drawstring("1", myfont, brushes.black, 100, 100);  // repeat code above new position string 

the problem text isn't erased entirely second drawstring black brush. small border remains visible. please help, how remove trace, , draw moving text correctly.

the problem solved adding following:

g.textrenderinghint = system.drawing.text.textrenderinghint.singlebitperpixel; 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -