const
{$IFDEF PAIDVERS}
SDLVersionInfo = 'sline_r1200_full';
IsLightEd = false;
{$ELSE}
SDLVersionInfo = 'sline_r1200_lighted';
IsLightEd = true;
{$ENDIF}
Release = 1200;
type
ESDLSLineError = class(Exception); { exception type to indicate errors }
TSLine = class (TComponent)
private
FParA : double;
FParB : double;
FParC : double;
FSubstInf: boolean;
procedure SetParA (value: double);
procedure SetParB (value: double);
procedure SetParC (value: double);
function GetDirect: double;
function GetSlope: double;
function GetIntercept: double;
protected
public
constructor Create (AOwner: TComponent); override;
destructor Destroy; override;
function AngleBetweenLines (OtherLine: TSLine): double;
procedure CalcKDForm (var k, d: double);
function CalcX (y: double): double;
function CalcY (x: double): double;
function ClipBox (bllx, blly, burx, bury: double;
var x1, y1, x2, y2: double): boolean;
property Direction: double read GetDirect;
property Slope: double read GetSlope;
property Intercept: double read GetIntercept;
function Distance (px, py: double): double;
function InterSection (OtherLine: TSLine;
var x,y: double): boolean;
function LineFrom2Points (P1X, P1Y, P2X, P2Y: double): boolean;
procedure LineThroughPoint (px, py, angle: double);
procedure LineFromSlopeIcpt (k, d: double);
procedure NormalLine (px, py: double; OtherLine: TSLine);
procedure ParallelLine (px, py: double; OtherLine: TSLine);
published
property SubstituteInf: boolean read FSubstInf write FSubstInf;
property ParA: double read FParA write SetParA;
property ParB: double read FParB write SetParB;
property ParC: double read FParC write SetParC;
end;
|