Results 1 to 6 of 6

Thread: stuck making a tbox with 4 dtms

  1. #1
    Join Date
    Jul 2007
    Posts
    238
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default stuck making a tbox with 4 dtms

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

    something like this


    Simba Code:
    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;
    ....

  2. #2
    Join Date
    Apr 2007
    Posts
    373
    Mentioned
    2 Post(s)
    Quoted
    24 Post(s)

    Default

    to make TBox;

    Simba Code:
    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.
    ~Fre

  3. #3
    Join Date
    Jul 2007
    Posts
    238
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

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

  4. #4
    Join Date
    Oct 2006
    Posts
    1,190
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    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));
    Last edited by Bonfield; 02-16-2012 at 08:21 AM.



  5. #5
    Join Date
    Dec 2011
    Location
    Holland
    Posts
    545
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    I thought it worked like this:

    If this is true, then its not possible to do it with 4 DTMs

  6. #6
    Join Date
    Oct 2006
    Posts
    1,190
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    how did you go with this?



Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •