Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- R: TRect;
- P1: TPoint;
- P2: TPoint;
- begin
- P1 := Point(10, 10);
- P2 := Point(-10, -10);
- // the third boolean parameter ensures the rectangle to be normalized
- R := TRect.Create(P1, P2, True);
- // here you can query for the rectangle's Height (but I guess that when having this normalized rectangle
- // you won't need it anymore, because this is the rectangle that you can use for cropping)
- ShowMessage(Format('Height: %d', [R.Height]));
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement