hi!,
I am looking for imageenvect objects (selected one) snapping ability. am I missed something in help file ?
not important no need any efforts, just I thought it would be good to know if something exists also for objects something like layers. (btw... code below, not works good. moving objects flickers).thats my first attemption. result=object flickers on move or resize. do you know a better solution or maybe a property I missed?
procedure Tfmmain.ImageenVect1ObjectMoveResize(Sender: TObject; hobj, Grip: Integer;
var OffsetX, OffsetY: Integer);
var
iv:TImageenVect;
isResize: boolean;
PosX, PosY, width_, height_: Integer;
begin
iv:=ImageenVect1;
isResize := (Grip <> 3);
PosX := Iv.ObjLeft[hobj];
PosY := Iv.ObjTop[hobj];
width_ := Iv.ObjWidth[hobj];
height_ := Iv.ObjHeight[hobj];
if not isResize then
begin
Iv.ObjLeft[hobj] := SnapToGrid(PosX);
Iv.ObjTop[hobj] := SnapToGrid(PosY);
end
else //otherwise it should resize ? probably
begin
Iv.ObjWidth[hobj] := SnapToGrid(PosX + width_) - PosX;
Iv.ObjHeight[hobj] := SnapToGrid(PosY + height_) - PosY;
end;
end;
-we love Imageen-