Description | Hierarchy | Fields | Methods | Properties |
type TRulerPainter = class(TObject)
TRulerPainter
is a class used to draw the ruler on a TCanvas. It does the actual drawing of the ruler in TRbwRuler but it can also be used to draw a ruler on any TCanvas.
![]() |
FPrecision: integer; |
![]() |
FMinorTickLength: integer; |
![]() |
FValues: TRulerValues; |
![]() |
FMajorTickLength: integer; |
![]() |
FDigits: integer; |
![]() |
FStart: TStart; |
![]() |
FLinePosition: integer; |
![]() |
FTextPosition: TTextPosition; |
![]() |
FTextOffset: integer; |
![]() |
FPositions: TRulerPositions; |
![]() |
FDesiredSpacing: integer; |
![]() |
FRulerPosition: TRulerPosition; |
![]() |
FOnInvalidate: TNotifyEvent; |
![]() |
FOwner: TComponent; |
![]() |
FAvailableArea: TRect; |
![]() |
procedure SetDesiredSpacing(const Value: integer); |
![]() |
procedure SetDigits(Value: integer); |
![]() |
procedure SetLinePosition(const Value: integer); |
![]() |
procedure SetMajorTickLength(const Value: integer); |
![]() |
procedure SetMinorTickLength(const Value: integer); |
![]() |
procedure SetPositions(const Value: TRulerPositions); |
![]() |
procedure SetPrecision(Value: integer); |
![]() |
procedure SetRulerPosition(const Value: TRulerPosition); |
![]() |
procedure SetStart(const Value: TStart); |
![]() |
procedure SetTextOffset(const Value: integer); |
![]() |
procedure SetTextPosition(const Value: TTextPosition); |
![]() |
procedure SetValues(const Value: TRulerValues); |
![]() |
procedure Invalidate; |
![]() |
function GetComponentState: TComponentState; |
![]() |
procedure DrawMainLine(ACanvas: TCanvas; out OutputRect: TRect); |
![]() |
procedure GetTickSpacingAndFactor( out Spacing: integer; out Factor: double); |
![]() |
function GetLineDrawingPosition: integer; |
![]() |
function GetOrientation: TOrientation; |
![]() |
function GetCurrentPosition(const CurPositionR: double): integer; |
![]() |
procedure DrawLabel(ACanvas: TCanvas; const CurPositionR, Increment: double; const CurPositionI: integer; var FirstLabel: boolean; var LastLabelLT, LastLabelRB: integer; out LabelDrawn: boolean; out LabelRect: TRect); |
![]() |
procedure DrawTick(ACanvas: TCanvas; const CurPositionI: integer; const IsMajorTick: boolean; out OutputRect: TRect); |
![]() |
procedure DrawMinorTicks(ACanvas: TCanvas; const LowCoord, Increment: double; const Index, Spacing: integer; DrawIntermediates: boolean; out OutputRect: TRect; Out TicksDrawn: boolean); |
![]() |
function GetTextDrawingPosition: TStart; |
![]() |
function RoundNumber(Value, Increment: double): string; |
![]() |
function Multiplier: double; |
![]() |
function GetDrawingMajorTickLength: integer; |
![]() |
function GetDrawingMinorTickLength: integer; |
![]() |
function GetHeight: integer; |
![]() |
function GetWidth: integer; |
![]() |
procedure GenerateRect(out OutputRect: TRect; X1, Y1, X2, Y2: Integer); |
![]() |
procedure SetDefaults; |
![]() |
procedure Assign(Source: TRulerPainter); |
![]() |
constructor Create(Owner: TComponent); |
![]() |
destructor Destroy; override; |
![]() |
class procedure PaintRotated(ACanvas: TCanvas; const X, Y, Angle: double; const Text: string; out LabelRect: TRect); virtual; |
![]() |
procedure DrawRuler(ACanvas: TCanvas; InputRect: TRect; var OutputRect: TRect); |
![]() |
FPrecision: integer; |
![]() |
FMinorTickLength: integer; |
![]() |
FValues: TRulerValues; |
![]() |
FMajorTickLength: integer; |
![]() |
FDigits: integer; |
![]() |
FStart: TStart; |
![]() |
FLinePosition: integer; |
![]() |
FTextPosition: TTextPosition; |
![]() |
FTextOffset: integer; |
![]() |
FPositions: TRulerPositions; |
![]() |
FDesiredSpacing: integer; |
![]() |
FRulerPosition: TRulerPosition; |
![]() |
FOnInvalidate: TNotifyEvent; |
![]() |
FOwner: TComponent; |
![]() |
FAvailableArea: TRect; |
![]() |
procedure SetDesiredSpacing(const Value: integer); |
![]() |
procedure SetDigits(Value: integer); |
![]() |
procedure SetLinePosition(const Value: integer); |
![]() |
procedure SetMajorTickLength(const Value: integer); |
![]() |
procedure SetMinorTickLength(const Value: integer); |
![]() |
procedure SetPositions(const Value: TRulerPositions); |
![]() |
procedure SetPrecision(Value: integer); |
![]() |
procedure SetRulerPosition(const Value: TRulerPosition); |
![]() |
procedure SetStart(const Value: TStart); |
![]() |
procedure SetTextOffset(const Value: integer); |
![]() |
procedure SetTextPosition(const Value: TTextPosition); |
![]() |
procedure SetValues(const Value: TRulerValues); |
![]() |
procedure Invalidate; |
![]() |
function GetComponentState: TComponentState; |
![]() |
procedure DrawMainLine(ACanvas: TCanvas; out OutputRect: TRect); |
|
![]() |
procedure GetTickSpacingAndFactor( out Spacing: integer; out Factor: double); |
|
![]() |
function GetLineDrawingPosition: integer; |
|
![]() |
function GetOrientation: TOrientation; |
![]() |
function GetCurrentPosition(const CurPositionR: double): integer; |
Get the pixel equivalent of the current number. |
![]() |
procedure DrawTick(ACanvas: TCanvas; const CurPositionI: integer; const IsMajorTick: boolean; out OutputRect: TRect); |
|
![]() |
function GetTextDrawingPosition: TStart; |
|
![]() |
function RoundNumber(Value, Increment: double): string; |
|
![]() |
function Multiplier: double; |
|
![]() |
function GetDrawingMajorTickLength: integer; |
|
![]() |
function GetDrawingMinorTickLength: integer; |
|
![]() |
function GetHeight: integer; |
![]() |
function GetWidth: integer; |
![]() |
procedure GenerateRect(out OutputRect: TRect; X1, Y1, X2, Y2: Integer); |
![]() |
procedure SetDefaults; |
![]() |
procedure Assign(Source: TRulerPainter); |
![]() |
constructor Create(Owner: TComponent); |
|
![]() |
destructor Destroy; override; |
|
![]() |
procedure DrawRuler(ACanvas: TCanvas; InputRect: TRect; var OutputRect: TRect); |
![]() |
property Height: integer read GetHeight; |
![]() |
property Width: integer read GetWidth; |
![]() |
property RulerOrientation: TOrientation read GetOrientation; |
|
![]() |
property ComponentState: TComponentState read GetComponentState; |
![]() |
property RulerDesiredSpacing: integer read FDesiredSpacing
write SetDesiredSpacing; |
|
![]() |
property RulerDigits: integer read FDigits write SetDigits; |
|
![]() |
property RulerEnds: TRulerPositions read FPositions write SetPositions; |
|
![]() |
property RulerLinePosition: integer read FLinePosition
write SetLinePosition; |
|
![]() |
property RulerMajorTickLength: integer read FMajorTickLength
write SetMajorTickLength; |
|
![]() |
property RulerMinorTickLength: integer read FMinorTickLength
write SetMinorTickLength; |
|
![]() |
property RulerPosition: TRulerPosition read FRulerPosition
write SetRulerPosition; |
|
![]() |
property RulerPrecision: integer read FPrecision write SetPrecision; |
|
![]() |
property RulerStart: TStart read FStart write SetStart; |
|
![]() |
property RulerTextOffset: integer read FTextOffset write SetTextOffset; |
|
![]() |
property RulerTextPosition: TTextPosition read FTextPosition
write SetTextPosition; |
|
![]() |
property RulerValues: TRulerValues read FValues write SetValues; |
|
![]() |
property OnInvalidate: TNotifyEvent read FOnInvalidate write FOnInvalidate; |