From: Michal MalĂ˝ Date: Fri, 26 Dec 2014 02:15:12 +0000 (+0100) Subject: Adjust borders and offsets to make the axis labels fit in better X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=24b8364645693c9639ae4f8fe5db2ac51a017b18;p=Nine-Q.git Adjust borders and offsets to make the axis labels fit in better --- diff --git a/src/problem_generators/problem_generator-titration_curve_suite.adb b/src/problem_generators/problem_generator-titration_curve_suite.adb index 67bda5f..c9ab08c 100644 --- a/src/problem_generators/problem_generator-titration_curve_suite.adb +++ b/src/problem_generators/problem_generator-titration_curve_suite.adb @@ -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); diff --git a/src/problem_generators/problem_generator.ads b/src/problem_generators/problem_generator.ads index 0de05e5..f1d228a 100644 --- a/src/problem_generators/problem_generator.ads +++ b/src/problem_generators/problem_generator.ads @@ -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;