Skip to content

UI.offsetRectByPoint

kerrishotts edited this page Apr 1, 2013 · 2 revisions

(part of UI)

Returns: rect object

Parameters: aRect (rect), aPoint (point)

Returns a copy of aRect shifted by aPoint.

Usage

var aRect = UI.makeRect ( UI.makePoint (10, 15), UI.makeSize (100, 150) );
var bRect = UI.offsetRectByPoint ( aRect, UI.makePoint ( 10, -5 ) );
// bRect is now { origin: { x: 20, y: 10 }, size: { w: 100, h: 150 } }

Version

0.3 Introduced; Docs Valid

Clone this wiki locally