xw-devtool-cli 1.0.32 → 1.0.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -123,14 +123,10 @@ public class DistanceForm : Form {
|
|
|
123
123
|
double dist = Math.Sqrt(Math.Pow(target.X - p1.X, 2) + Math.Pow(target.Y - p1.Y, 2));
|
|
124
124
|
string text = String.Format("{0:F2} px", dist);
|
|
125
125
|
|
|
126
|
-
// Draw text at midpoint
|
|
127
|
-
Point mid = new Point((p1.X + target.X) / 2, (p1.Y + target.Y) / 2);
|
|
128
126
|
SizeF size = g.MeasureString(text, font);
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
float
|
|
132
|
-
float txtY = mid.Y + 10;
|
|
133
|
-
|
|
127
|
+
float pad = 16;
|
|
128
|
+
float txtX = this.ClientSize.Width - (float)size.Width - pad;
|
|
129
|
+
float txtY = this.ClientSize.Height - (float)size.Height - pad;
|
|
134
130
|
g.FillRectangle(textBg, txtX - 2, txtY - 2, size.Width + 4, size.Height + 4);
|
|
135
131
|
g.DrawString(text, font, Brushes.White, txtX, txtY);
|
|
136
132
|
|