Login Page - Create Account

Support Board


Date/Time: Wed, 01 Jan 2025 12:43:24 +0000



Post From: ACSIL: How to keep the text above a horizontal line regardless of scale range changes?

[2016-05-16 10:21:38]
User129630 - Posts: 22
I want to keep (draw) the text slightly above a horizontal line regardless of the scale range changes. However, when I do the scale range changes, the text seems to float up or down and doesn't stay above the horizontal line anymore. It is probably incorrect to use the value with (y value of the horizontal line - font size). I look at all the documentation and couldn't find an alternative for this. The following is my code. Please advise.

  Tool.BeginValue = -8; // assuming the horizontal line is at 0.
// Unfortunately, the text doesn't stay above the horizontal line after scale range changes
  Tool.Color = color;
  Tool.FontSize = 8;
  Tool.FontBold = true;
  Tool.AddMethod = UTAM_ADD_OR_ADJUST;
  Tool.ReverseTextColor = 0;
  Tool.TextAlignment = DT_CENTER;
  Tool.Text.Format(" %.2f", value);
  return(sc.UseTool(Tool));