paperjs / paper.js

The Swiss Army Knife of Vector Graphics Scripting – Scriptographer ported to JavaScript and the browser, using HTML5 Canvas. Created by @lehni & @puckey
http://paperjs.org
Other
14.45k stars 1.22k forks source link

How can i get item globalMatrix #408

Closed jameszhong2008 closed 10 years ago

jameszhong2008 commented 10 years ago

Hello, how to get item global matrix, item.globalMatrix return null.

lehni commented 10 years ago

It shouldn't return null. Please provide a test-case where I can see this happening. What version of the library are you using?

jameszhong2008 commented 10 years ago

Please open this http://jsfiddle.net/zhongjian2008/LQXM8/ and if i can't get gloabla matrix by this way, how can i get it, i know parent matrix and child matrix. Can you tell me.

lehni commented 10 years ago

You're using an outdated version of paper. Could you try the latest nightly build just to be sure?

jameszhong2008 commented 10 years ago

Yes, i just download master version of paperjs on github, i use paper.js under dist folder directly. It is as the same. Do i need build it?

lehni commented 10 years ago

Yes you need to build. But it's easier to download the nightly build here: http://paperjs.org/download/

lehni commented 10 years ago

I'm pretty sure it's fixed in the nightlies since it works here:

http://sketch.paperjs.org/#S/tZFNb4MwDIb/CsoF0CIaou3SaScOO02a1iuXFEyJamIUsnUf2n8foRIFpHbrYZGiKPZjx++bL2ZUA2zNNntwRc04K6j09zdlg1a1YB8tvbbBQ2DgcAwkQySK73NzAhJnlekqsk1GxoFxfUWlsIM51VKnnSYz6/dM2rgoFYJLIXzb1WpIvEDhkkojZoRk+5Jwi6rYhz0xTueZdNZtU/dH4uPK7BCi5TuCizg3wd8Xn/TWnzAM2u94NGCY4aI02UtLxaJgpsxCGc7TlpxyEEmxMFqVZVZrLKMT64mFJ/IqT24Fv/sPV+TlD+cLT+Tckw9ApEP4m3x5lF+Q6QghQdpNckmjnNXvHjkD7JC2Cp9GTCFYF+VsGl/n7OZsCfv+AQ==