Feature Overview
EXRECT() creates a rectangle object with extended functionality.
- The created rectangle object can be drawn and its inclusions and overlaps can be checked.
- Drawing and update functions return their own objects, so they can be written in succession.
- This function consumes 388 Token.(include comb() and cat() functions)
r = exrect('10 80 16 24') -- generate a rectangle object from a string. x:10, y:10, width:16, height:24 r.rf(6).rs(7) -- draw "r" with rectfill, and then draw it again with rect. ?r.con(13,80) -- true ?r.con(9,80) -- false ?r.con(exrect'12 82 8 8') -- true ?r.con(exrect'9 82 8 8') -- false ?r.hov(exrect'12 82 8 8') -- true ?r.hov(exrect'9 82 8 8') -- true --Check the code for further applications! |
This function is included in the KNUTIL library.
release note
[Please log in to post a comment]