Applies to
Declaration
procedure Paint(const Canvas: TCanvas; const X,Y,Length,GridSize: integer; Kind: TAxisKind); public
Description
TAxis.Paint method may be called to draw axis on the arbitrary canvas.
******************************************
NOTICE: we need to use float calculations whenever possible since precision losses at the integer->float conversion may crucially distort output! For example, MajorTicksPositions are float, and we use Round() only at the final stages of calculations.
Another remark: we have 4 slightly different PaintXXX procs - this solution was made primarily for clarity of code.
==========================================
Starting from build 320, linked axis feature supported. In this mode, we use almost the same code - changes are minimal. The trick is that both axes have the same width, and painting code really doesn't calculate labels values - all these tasks performed in separate methods. So that, FormatLabel and Scale were modified.