]> Devoid-pointer.net GitWeb - Nine-Q.git/commitdiff
Adjust borders and offsets to make the axis labels fit in better
authorMichal Malý <madcatxster@devoid-pointer.net>
Fri, 26 Dec 2014 02:15:12 +0000 (03:15 +0100)
committerMichal Malý <madcatxster@devoid-pointer.net>
Fri, 26 Dec 2014 02:15:12 +0000 (03:15 +0100)
src/problem_generators/problem_generator-titration_curve_suite.adb
src/problem_generators/problem_generator.ads

index 67bda5fdc814a2ddef8e5f293c294a818d3acc4a..c9ab08c996040be86e31cd2c4a27c9cfcb131925 100644 (file)
@@ -643,7 +643,7 @@ package body Titration_Curve_Suite is
       Tick_Label_CStrPtr := Interfaces.C.Strings.New_Char_Array(Interfaces.C.To_C(Y_AXIS_UNITS_TEXT));
       if Tick_Label_CStrPtr /= Interfaces.C.Strings.Null_Ptr then
        Cairo.Text_Extents(Ctx, Tick_Label_CStrPtr, Text_Extents'Access);
-        Cairo.Move_To(Ctx, TEXT_SPACE + Text_Extents.Height, Y_OFFSET + IMAGE_CHART_HEIGHT / (2.0) - (Text_Extents.X_Advance / 2.0));
+        Cairo.Move_To(Ctx, TEXT_SPACE + Text_Extents.Height - 5.0, Y_OFFSET + IMAGE_CHART_HEIGHT / (2.0) - (Text_Extents.X_Advance / 2.0));
        Cairo.Save(Ctx);
        Cairo.Rotate(Ctx, -(Ada.Numerics.PI / 2.0));
        Cairo.Show_Text(Ctx, Y_AXIS_UNITS_TEXT);
index 0de05e5532650634b70ad3e3f9f2bf25151366cd..f1d228a25b09f6f2d8e2d96852c813674eb1649e 100644 (file)
@@ -231,8 +231,8 @@ private
     --
     IMAGE_WIDTH: constant Glib.GInt := 800;
     IMAGE_HEIGHT: constant Glib.GInt := 800;
-    IMAGE_RIGHT_BORDER_WIDTH: constant Glib.GDouble := 35.0;
-    IMAGE_BOTTOM_BORDER_HEIGHT: constant Glib.GDouble := 45.0;
+    IMAGE_RIGHT_BORDER_WIDTH: constant Glib.GDouble := 50.0;
+    IMAGE_BOTTOM_BORDER_HEIGHT: constant Glib.GDouble := 55.0;
     X_OFFSET: constant Glib.GDouble := 45.0;
     Y_OFFSET: constant Glib.GDouble := 60.0;
     IMAGE_CHART_WIDTH: constant Glib.GDouble := Glib.GDouble(IMAGE_WIDTH) - X_OFFSET - IMAGE_RIGHT_BORDER_WIDTH;