praeclarum / NGraphics

NGraphics is a cross platform library for rendering vector graphics on .NET. It provides a unified API for both immediate and retained mode graphics using high quality native renderers.
MIT License
710 stars 133 forks source link

Fixed DrawText and MeasureText for .Net #42

Open nilcat opened 8 years ago

nilcat commented 8 years ago

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.

BlueRaja commented 8 years ago

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

nilcat commented 8 years ago

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)?

BlueRaja commented 8 years ago

Look at the diff before you commit?

nilcat commented 8 years ago

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

BlueRaja commented 8 years ago

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