Skip to content

Fixed DrawText and MeasureText for .Net#42

Open
nilcat wants to merge 4 commits intopraeclarum:masterfrom
nilcat:Net-text-fikses
Open

Fixed DrawText and MeasureText for .Net#42
nilcat wants to merge 4 commits intopraeclarum:masterfrom
nilcat:Net-text-fikses

Conversation

@nilcat
Copy link

@nilcat nilcat commented Nov 19, 2015

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
Copy link

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
Copy link
Author

nilcat commented Nov 19, 2015

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
Copy link

Look at the diff before you commit?

@nilcat
Copy link
Author

nilcat commented Nov 20, 2015

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

@BlueRaja
Copy link

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

… 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)
… 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants