SRL Archive - Help

stuck making a tbox with 4 dtms


sjlou

2012-02-16 02:51:36

like the title said im trying to make a tbox with 4 different dtms

something like this

var lo,lb,rb,ro,xlo,ylo,xbl,ybl,xrb,yrb,xro,yro:integer;
rbox: TBox;

begin


lo := DTMFromString('maQEAAHicE2RgYAhkYmAIAeIwKI2Mo4A4C4grgTgFiMuBuAiIE4E4GIjzgDgaiEuB5uQDcREQpwFxPMhcIHYCYiskDJIvBmJzKLYE4hIGiH4GdlaGT69fEo1B6tGxEdAYSjEjEDNBMQuZGAMAAExSLrA=');
lb := DTMFromString('mqAEAAHicE2FgYAhmYmAIAeIwIE4E4hwgLoOKwXAQEAcCcQxUHiYWAcRJUPW5QBwLxJZAM22B2AoNOwOxNxDHAnEQELsAsTkUFwBxCRAXQXExEJdCMQM7K8On1y/xYpAaZAwTw6bGCGgkNTEjEmahAsYGAK5CM80=');
rb:= DTMFromString('mPwEAAHic42dgYFjIxMAwB4jnAfFUIO4E4koofy4Ug9Q0QdkgNR1QNZ5A/d5A7AelYTgSiJOBuASIc4DYHYibgLgViFugmJWNjeHttx94MUgNNnVGQP3kYkYoZiEDowEAaGg0Hg==');
ro:= DTMFromString('mPwEAAHic42dgYNjIxMCwHohXAfESIJ4JxL1QMRheDcSLoOIbgHgGEE8F4lag/nogbkbDZUCcAsSBQOyDhL2guA2I2VmZGT7+fks0BqmHYSOgfnIxIxCzkInRAADJYDK1');


FindDTM(lo,xlo,ylo, MsX1, MsY1, MsX2, MsY2);
FindDTM(lb,xbl,ybl, MsX1, MsY1, MsX2, MsY2);
FindDTM(rb,xrb,yrb, MsX1, MsY1, MsX2, MsY2);
FindDTM(ro,xro,yro, MsX1, MsY1, MsX2, MsY2);


rBox.X1 := xlo,ylo;
rBox.Y1 := xbl,ybl;
rBox.X2 := xrb,yrb;
rBox.Y2 := xro,yro;
end;

fre

2012-02-16 02:59:10

to make TBox;

var
box:TBox;
begin
box.x1 := 100;
box.y1 := 100;
box.x2 := 200;
box.y2 := 200;
end;


So only the x or the y cooridinate, you store both in .x or .y

I hope you understand this.
If not jus ask for a clearer explanation.

sjlou

2012-02-16 03:03:22

i know how to make a tbox lol..
but i want to make a tbox with the cords i find with the 4 dtms

Bonfield

2012-02-16 03:03:34

you could use pointtobox

EDIT is it always a box? could you take the top left, then bottom right then turn that into a tbox, if not you might have to make a function that turns the points into a polygon

PointToBox(point(dtm1.x, dtm1.y), point(dtm4.x, dtm4.y));

Chris

2012-02-16 10:39:21

I thought it worked like this:
If this is true, then its not possible to do it with 4 DTMs

Bonfield

2012-02-17 05:48:10

how did you go with this?