Ast editor custom draw
This commit is contained in:
@@ -29,8 +29,8 @@ type
|
||||
private
|
||||
FRootNode: TVisualNode;
|
||||
|
||||
FContentOffset: TPointF; // Verschiebung in Screen-Pixeln
|
||||
FZoom: Single; // Skalierungsfaktor
|
||||
FContentOffset: TPointF;
|
||||
FZoom: Single;
|
||||
|
||||
FIsPanning: Boolean;
|
||||
FLastMousePos: TPointF;
|
||||
@@ -62,10 +62,6 @@ type
|
||||
procedure UpdateDropMarker(const WorldPos: TPointF);
|
||||
procedure StopDrag;
|
||||
|
||||
// Koordinaten-Transformation
|
||||
function LocalToWorld(const ALocalPoint: TPointF): TPointF;
|
||||
function WorldToLocal(const AWorldPoint: TPointF): TPointF;
|
||||
|
||||
protected
|
||||
procedure Paint; override;
|
||||
procedure MouseDown(Button: TMouseButton; Shift: TShiftState; X, Y: Single); override;
|
||||
@@ -77,6 +73,9 @@ type
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
|
||||
function LocalToWorld(const ALocalPoint: TPointF): TPointF;
|
||||
function WorldToLocal(const AWorldPoint: TPointF): TPointF;
|
||||
|
||||
procedure BeginDragNode(ASource: TVisualNode);
|
||||
procedure InvalidateConnections;
|
||||
|
||||
@@ -309,7 +308,6 @@ begin
|
||||
|
||||
if Assigned(FRootNode) then
|
||||
begin
|
||||
// --- HIT TEST FIX ---
|
||||
// HitTest expects coordinates relative to the Node's Local Origin (0,0).
|
||||
// The RootNode is drawn at FRootNode.Position in World Space.
|
||||
// So we transform: WorldMouse - NodePosition
|
||||
|
||||
Reference in New Issue
Block a user