mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 21:13:23 -07:00
Fixed the very old incorrect size information bug
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2333 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
22c58f739c
commit
2aa53d444b
1 changed files with 10 additions and 3 deletions
|
@ -591,9 +591,16 @@ namespace Greenshot.Forms {
|
|||
// rulers
|
||||
int dist = 8;
|
||||
|
||||
string captureWidth = (captureRect.Width + 1).ToString();
|
||||
string captureHeight = (captureRect.Height + 1).ToString();
|
||||
|
||||
string captureWidth;
|
||||
string captureHeight;
|
||||
// The following fixes the very old incorrect size information bug
|
||||
if (captureMode == CaptureMode.Window) {
|
||||
captureWidth = captureRect.Width.ToString();
|
||||
captureHeight = captureRect.Height.ToString();
|
||||
} else {
|
||||
captureWidth = (captureRect.Width + 1).ToString();
|
||||
captureHeight = (captureRect.Height + 1).ToString();
|
||||
}
|
||||
using (Font rulerFont = new Font(FontFamily.GenericSansSerif, 8)) {
|
||||
Size measureWidth = TextRenderer.MeasureText(captureWidth, rulerFont);
|
||||
Size measureHeight = TextRenderer.MeasureText(captureHeight, rulerFont);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue