GDI printing enhancement: the x,y coordinates in all //GDI directives may now be optionally be expressed relative to the current cursor position by prefacing the coordinate value with "+" or "-". For directives with more than one x,y pair (such as //RECTANGLE or //POLYGON), any relative coordinates are treated as relative to the prior coordinate on the same axis. Some examples:
//;absolute coordinates - from (100,200) to (300,400) ...
//RECTANGLE,100,200,300,400
//;relative coordinates - from 50 units above the current x,y cursor,
//;extending 200 to the right and 75 down
//RECTANGLE,+0,-50,+200,+75
Notes:
• | While mathematically N is the same as +N, within the context of GDI directives, they are all strings, allowing the +N to be recognized and treated differently than N—i.e. as relative rather than absolute. |
• | To preserve backwards compatibility, those directives that interpreted -1,-1 as the current position will continue to do so. |
• | The //IMAGE directive continues to support negative right and bottom coordinates as indicating width and height. (Fortunately, there is no particular need for negative widths or heights, so nothing is lost by treating negative and positive relative right and bottom coordinates the same here.) |