NGraphics icon indicating copy to clipboard operation
NGraphics copied to clipboard

Fixed DrawText and MeasureText for .Net

Open nilcat opened this issue 10 years ago • 5 comments

Changed DrawText to use GraphicsUnit.Point so that text size is equal to System.Drawing.DrawString text, MeasureText is changes in the same way, the text is also moved below the specified point (also like System.Drawing) Finally DrawText throws an exception instead of just returning if the brush is null

Fixes #41.

nilcat avatar Nov 19 '15 09:11 nilcat

In general, you should separate your formatting commits from your actual code-change commits, or it's impossible to review. In fact, ideally they'd be separate PR's (since formatting changes typically negatively affect other PR's)

@repo owner: You can view the changes without whitespace changes here: https://github.com/praeclarum/NGraphics/pull/42/files?w=1

BlueRaja avatar Nov 19 '15 16:11 BlueRaja

I was unaware that I had changed any formatting (it was definitively not my intention but probably happened because i routinely execute the Format Document command in VS). Ill try to get this sorted tomorrow, but I'm new to git/github so please bear with me.

Is there a way to prevent such problems in the future (a setting in ghithub or vs maybe)?

nilcat avatar Nov 19 '15 20:11 nilcat

Look at the diff before you commit?

BlueRaja avatar Nov 19 '15 21:11 BlueRaja

The code is now updated and any format changes is removed (I'll add them in a separate PR)

nilcat avatar Nov 20 '15 13:11 nilcat

Do a rebase --> squash --> force-push

BlueRaja avatar Nov 20 '15 17:11 BlueRaja