Quantcast
Channel: MSDN Blogs
Viewing all articles
Browse latest Browse all 29128

Sample app for RECT functions

$
0
0

Riffing on Raymond Chen's post today about SubtractRect I threw together a toy app which demonstrates three rectangle functions: UnionRect, IntersectRect, and SubtractRect.

Usage:

>rects.exe
rects.exe
    union     (left1 top1 right1 bottom1) (left2 top2 right2 bottom2) |
    intersect (left1 top1 right1 bottom1) (left2 top2 right2 bottom2) |
    subtract  (left1 top1 right1 bottom1) (left2 top2 right2 bottom2)

Sample output:

>rects.exe union (2 2 6 6) (4 4 8 8)
      (left = 2; top = 2; right = 6; bottom = 6)
union (left = 4; top = 4; right = 8; bottom = 8)
    = (left = 2; top = 2; right = 8; bottom = 8)

Source and binaries (amd64 and x86) attached.

Still no pictures though.


Viewing all articles
Browse latest Browse all 29128

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>