Handbook
Glossary
offset-rect ( rect loc -- newrect )
Factor handbook
»
UI framework
»
Building user interfaces
»
Gadget geometry
»
Rectangles
Prev:
contains-point? ( point rect -- ? )
Vocabulary
math
.
rectangles
Inputs
rect
a
rect
loc
a pair of integers
Outputs
newrect
a new
rect
Word description
Creates a new rectangle with the same dimensions, and top-left corner translated by
loc
.
Definition
USING:
accessors
kernel
math.vectors
;
IN:
math.rectangles
:
offset-rect
( rect loc -- newrect )
over
loc>>
v+
swap
dim>>
<rect>
;