diff options
| author | jpbruyere <jp.bruyere@hotmail.com> | 2015-06-21 15:39:58 +0200 |
|---|---|---|
| committer | jpbruyere <jp.bruyere@hotmail.com> | 2015-06-21 15:39:58 +0200 |
| commit | dc995bd1da98971009454f4efe043d6237d00729 (patch) | |
| tree | 3af8d3a6745e9779edb71de29f3463898a3dedd0 /src/GraphicObjects/Label.cs | |
| parent | 746f5cfb60c9a798825e31c2e362cfc817e59d44 (diff) | |
* OpenTK:
* OpenTKGameWindow.cs:
* Tests.csproj:
* GOLIBTest_4.cs:
* GOLIBTest_1.cs:
* Window.goml:
* Listbox.goml:
* test4.goml:
* GOLIBTest_Expandable.cs:
* testExpandable.goml: debug and test
* Colors.cs: debug argb->rgba
* CompilerServices.cs: value type conversion
* Border.cs: default border =1
* Checkbox.cs:
* Expandable.cs: changes in update technic
* Group.cs: Clipping debug (need rework)
* Label.cs: debug text positionning
* Slider.cs: debug
* TextBox.cs: selectable=true by default
Diffstat (limited to 'src/GraphicObjects/Label.cs')
| -rwxr-xr-x | src/GraphicObjects/Label.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/GraphicObjects/Label.cs b/src/GraphicObjects/Label.cs index 27a766d2..e9951862 100755 --- a/src/GraphicObjects/Label.cs +++ b/src/GraphicObjects/Label.cs @@ -287,6 +287,8 @@ namespace go //gr.FontOptions.HintMetrics = HintMetrics.On;
rText = new Rectangle(measureRawSize());
+ rText.Width -= 2 * Margin;
+ rText.Height -= 2 * Margin;
widthRatio = 1f;
heightRatio = 1f;
@@ -479,6 +481,24 @@ namespace go if (string.IsNullOrWhiteSpace (l))
continue;
+// double t = rText.Y;
+// gr.LineWidth = 1;
+// gr.Color = Color.Green;
+// gr.MoveTo (rText.X, t);
+// gr.LineTo (rText.X + rText.Width, t);
+// gr.Stroke ();
+// gr.MoveTo (rText.X, t + rText.Height);
+// gr.LineTo (rText.X + rText.Width, t + rText.Height);
+// gr.Stroke ();
+// gr.Rectangle (rText);
+// gr.Fill ();
+//
+// t += fe.Ascent;
+// gr.Color = Color.Red;
+// gr.MoveTo (rText.X, t);
+// gr.LineTo (rText.X + rText.Width, t);
+// gr.Stroke ();
+
gr.Color = Foreground;
gr.MoveTo (rText.X, rText.Y + fe.Ascent + fe.Height * i);
|