diff options
-rw-r--r-- | catbird/node-2d.scm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/catbird/node-2d.scm b/catbird/node-2d.scm index a6a70bd..eb39b6b 100644 --- a/catbird/node-2d.scm +++ b/catbird/node-2d.scm @@ -60,7 +60,13 @@ expire-local-matrix follow-bezier-path local-bounding-box + local-height local-matrix + local-origin-x + local-origin-y + local-width + local-x + local-y move-by move-to on-child-resize @@ -405,6 +411,24 @@ (define-method (default-height (node <node-2d>)) 0.0) +(define-method (local-x (node <node-2d>)) + (rect-x (local-bounding-box node))) + +(define-method (local-y (node <node-2d>)) + (rect-y (local-bounding-box node))) + +(define-method (local-width (node <node-2d>)) + (rect-width (local-bounding-box node))) + +(define-method (local-height (node <node-2d>)) + (rect-height (local-bounding-box node))) + +(define-method (local-origin-x (node <node-2d>)) + (matrix4-transform-x (local-matrix node) 0.0 0.0)) + +(define-method (local-origin-y (node <node-2d>)) + (matrix4-transform-y (local-matrix node) 0.0 0.0)) + (define-method (on-child-resize node child) #t) |