aboutsummaryrefslogtreecommitdiffstats
path: root/playgrounds/transforms/transforms.js
diff options
context:
space:
mode:
Diffstat (limited to 'playgrounds/transforms/transforms.js')
-rw-r--r--playgrounds/transforms/transforms.js17
1 files changed, 16 insertions, 1 deletions
diff --git a/playgrounds/transforms/transforms.js b/playgrounds/transforms/transforms.js
index 3b12f65..f9de24b 100644
--- a/playgrounds/transforms/transforms.js
+++ b/playgrounds/transforms/transforms.js
@@ -1,5 +1,5 @@
-let mover = SVG.select("#new")[0]
+// let mover = SVG.select("#new")[0]
// mover.transform({
// // position: [800, 500],
// // origin: [200, 400],
@@ -18,3 +18,18 @@ let mover = SVG.select("#new")[0]
//
//
// var es = SVG.select('ellipse')
+
+draw = SVG("svg")
+
+
+offset = draw.screenCTM()
+draw.viewbox(100,100, 200, 200)
+nested = draw.nested().size(200, 200).move(100,100).viewbox(0, 0, 100, 100)
+rect = nested.rect(50, 180).stroke({width:0}).move(25, 90).scale(2, 0, 0).transform({tx:10, ty:10}, true)
+
+var box = rect.rbox()
+draw.rect(box.width, box.height).move(box.x, box.y).fill("blue")
+draw.rect(78, 226).move(100, 360).fill("blue")
+
+// rect1.toParent(nested).transform()
+// rect2.toParent(g2).transform()