this is PASCAL;
I have numeorus rectangles which are defined by their top right and bottom left corner coordinates like (x1,y1,x2,y2). i have to shift these coordinates by variables a and b (x1+a,y1+b,x2+a,y2+b).
is there an easy way to define these constants and then shift them? I am doing this by one by and it takes a long time. pls dont tell me to use “some concept or command” give an example code if possible
You don’t mention your compiler, but in active versions of Pascal (Delphi or FPC), if you have the rectangles in a TRect named rect, you can simply do
you might need to add unit “types” to your uses clause though