我有一个使用CompoundPath的简单paperscript example,但是在 Canvas 上没有打印任何内容。

我在这里想念的是什么?

编辑:我也测试了作为JSBIN外的纯HTML,但那里也没有运气。我还测试了paper.js和paper-full.min.js。

EDIT2:github dist文件中存在一些问题。我现在使用了http://sketch.paperjs.org/assets/js/paper.js,它成功了:http://jsbin.com/qicif/14。我做了一个diffnow,有490个差异。

<!DOCTYPE html>
<html>
<head>
<script src="https://rawgithub.com/paperjs/paper.js/master/dist/paper-full.js"></script>
<title>Paper.JS</title>
</head>
<body>
<h3>Paper.JS, Testing parsing and rendering tree shape</h3>
<canvas id="papercanvas" width="1000" height="650">
<script type="text/paperscript" canvas="papercanvas">
var tree = 'm142.02672,144.18675c-0.87282,0 -1.32173,-1.05858 -1.32173,-2.32841c0,-1.05797 0.22397,-2.08566 0.87285,-2.08566c0.44888,0 1.12547,1.02769 1.35042,2.08566c0.4489,1.5412 0,2.32841 -0.90154,2.32841zm149.35384,60.40503c1.99838,0 2.44714,0.27197 1.32251,2.08568c-0.64966,1.26994 -1.99826,2.32773 -2.64819,2.32773c-0.67606,0 -1.34888,-1.05779 -1.34888,-2.32773c0,-1.30017 0.89972,-2.08568 2.67456,-2.08568zm-139.55655,-73.88905c-1.99875,-0.51309 -2.22382,-3.11499 0,-3.9c1.12535,-0.24212 1.77426,0.51363 1.77426,2.08624c0,1.30067 -0.64891,2.0558 -1.77426,1.81377zm-24.91674,82.17212c2.67516,-0.75589 2.67516,-1.29906 1.77436,-3.08366c-0.67297,-1.29932 -0.89787,-2.87166 -0.44901,-3.38496c0.22496,-0.78725 1.34981,0 1.99924,1.54118c0.90086,2.08586 1.57378,2.35905 3.34909,1.05779c1.09988,-0.78464 1.99765,-1.29956 1.99765,-0.51332c0,0.51332 0.67593,0 1.55031,-1.0585c1.34988,-1.54114 1.57384,-4.92749 0.22499,-6.74197c-1.09937,-1.54117 -6.67313,-1.02707 -8.22237,0.78548c-0.89891,1.30092 -1.57475,1.02901 -2.44821,-1.29878c-1.34978,-3.87073 -1.34978,-4.41411 1.77426,-4.6562c2.67514,0 2.67514,0 0.44891,-1.57219c-1.12274,-0.75563 -2.22318,-2.32777 -2.22318,-3.35532c0,-2.60083 3.09966,-4.14198 4.4494,-2.32777c0.44901,0.75534 1.32288,1.54124 2.22321,1.54124c1.77376,0 10.24612,-8.79697 10.24612,-10.6114c0,-0.78664 0.87599,-1.30074 1.77383,-0.78664c1.10028,0.27312 3.09901,-0.5141 5.12532,-1.81429c2.87218,-2.08589 2.87218,-2.32776 1.3228,-5.71292c-1.09877,-2.32829 -2.44759,-3.11491 -5.57179,-3.11491c-3.5489,0 -4.44942,0.51411 -5.54723,3.6288c-0.45195,2.08524 -1.80229,3.62698 -2.67508,3.62698c-1.55042,0 -1.99928,-2.32642 -0.44897,-3.62698c0.67285,-0.51389 1.12181,-2.32838 1.12181,-4.14284c0,-2.84183 -0.44896,-3.35487 -3.34808,-2.59912c-2.89906,0.51347 -2.89906,0.2713 -2.22372,-3.62898c0.45001,-2.32771 1.09888,-4.41338 1.5499,-4.65555c0.44885,-0.27188 0.89777,-2.5997 0.89777,-4.92751c0,-4.65675 1.32645,-5.44142 3.7766,-2.08626c1.12282,1.81436 1.79871,2.08626 2.22264,0.51398c0.44888,-1.02805 2.02422,-1.26984 4.47394,-0.75604c3.32465,1.0274 3.54842,0.75604 3.09956,-2.32843c-0.22383,-1.81367 -0.45148,-3.89937 -0.67644,-4.41336c0,-0.78534 -1.09769,-1.81386 -2.42313,-2.5997c-2.67462,-1.30002 -3.34846,-4.41379 -0.90099,-4.41379c0.67601,0 1.32538,-0.51381 1.32538,-1.54311c0,-0.78532 1.34996,-1.29843 3.12402,-1.05846c2.45134,0.27313 3.77319,-0.75517 7.12224,-6.19672c2.45015,-3.90037 4.22383,-5.98607 4.44887,-4.92747c0.22385,1.29906 1.35022,2.05457 2.45021,2.05457c1.77412,0 1.99921,-0.75552 1.34985,-4.1403c-0.22699,-2.32835 -1.34985,-5.16959 -2.02586,-6.47085c-1.99924,-2.87224 -1.99924,-6.2277 0,-5.20058c1.57396,1.02903 6.47321,-1.81252 6.47321,-3.62717c0,-0.78625 0.65091,-1.30028 1.54883,-1.30028c0.90132,0 1.32527,1.57256 1.32527,3.62865c0,2.60004 0.45003,3.62714 1.57478,2.87138c0.87344,-0.54356 1.54933,-2.08604 1.54933,-3.1131c0,-3.11504 7.12206,-8.55657 8.89619,-7.01415c0.6761,0.51405 1.34981,0 1.57704,-1.81373c0.64894,-3.62901 4.67072,-6.47049 6.44507,-4.65612c0.90092,0.7552 1.77528,0.51402 2.00223,-0.27132c0.44887,-1.02934 2.22319,-1.81439 4.22191,-2.0571c1.99823,-0.2713 4.67349,-1.30061 5.79819,-2.35856c4.22299,-3.35551 8.44743,-3.11345 10.22118,0.51526c1.12631,2.59911 1.57535,2.59911 1.57535,0.78481c0,-2.32783 0.87589,-2.59913 6.22314,-1.81379c8.47084,1.02898 9.7961,1.02898 12.92024,-0.27187c1.99872,-0.75556 2.67474,-0.51347 2.67474,1.57223c0,1.30063 0.64935,2.32774 1.55031,2.32774c0.67294,0 1.32268,-0.75581 1.32268,-1.5424c0,-2.08569 3.57564,-3.11312 6.69936,-2.08569c2.42308,1.02898 2.64809,1.30035 1.99893,8.28426c-0.22455,4.17165 0,7.0135 0.42415,7.0135c0.44884,0 0.90146,-1.8138 0.90146,-4.4138c0,-4.38391 2.44759,-6.19733 3.34789,-2.59971c0.22508,1.29943 0.87384,0.78535 1.32294,-1.26923c1.12471,-5.44335 3.57603,-2.60153 2.90001,3.35519c-0.67377,4.92754 -0.67377,4.92754 1.32474,3.11375c1.12552,-0.78591 1.9985,-2.84177 1.9985,-4.14117c0,-1.30032 0.6767,-2.84274 1.57474,-3.38689c1.77414,-1.02652 3.77536,2.87195 3.12384,5.71465c-0.22476,1.29939 -0.22476,2.32777 0.42456,2.32777c0.45193,0 0.90109,-0.75521 0.90109,-1.30027c0,-0.75554 1.09982,-1.0275 2.44998,-0.51345c2.89679,0.78534 3.3219,2.87103 0.87387,4.14027c-0.6488,0.54546 -1.32483,1.81437 -1.32483,2.87322c0,1.81434 0.45096,1.81434 2.89853,0c3.9985,-3.11313 5.77237,-2.87322 6.44888,0.51367c0.44873,1.81469 1.3248,2.60093 2.22269,1.81469c0.90067,-0.27221 2.90005,0.78624 4.44937,2.59904c1.34982,1.54244 3.34909,2.84157 4.24899,2.84157c1.32568,0 1.32568,1.30124 0.87366,4.92958c-0.4487,3.90008 -0.4487,4.41349 0.90106,2.84151c1.77423,-2.57014 2.44815,-2.32837 3.09967,1.2988c0.22491,1.81431 1.79861,3.11502 3.57278,3.90003c1.99896,0.51581 3.1001,1.8147 3.1001,3.35703c0,1.57259 0.67303,3.38509 1.34897,4.41412c1.77429,1.81407 1.32285,7.25523 -0.67593,9.0699c-0.67303,0.54327 -1.55045,0.27196 -1.77417,-0.51402c-0.44904,-0.78659 -1.99896,-0.78659 -4.89804,0c-4.67444,1.81311 -5.5481,2.32832 -4.44946,4.68561c0.67609,1.5412 8.44946,1.0278 12.69534,-0.78651c1.32629,-0.78539 1.77542,0 1.77542,3.62863c0,2.59908 -0.44913,4.65562 -1.12296,4.65562c-0.45233,0 -0.87643,0.78531 -0.87643,2.08589c0,3.11504 1.10052,2.84154 4.00021,-0.78529c1.54712,-2.08595 2.44812,-2.60089 3.54834,-1.3006c1.12283,1.3006 1.34988,1.3006 1.34988,-0.78535c0,-1.27119 -0.45197,-2.3278 -1.12491,-2.3278c-0.42538,0 -0.8765,-1.02901 -0.8765,-2.05618c0,-1.3006 0.65152,-2.3284 1.54944,-2.3284c0.67688,0 1.5748,0.51379 1.5748,1.26984c0,0.78696 0.8765,1.81381 2.00125,2.08574c1.54691,0.78722 1.99936,1.81435 1.77429,4.92747c-0.45145,5.95676 0.44879,7.7711 3.77292,6.74396c1.57477,-0.51581 2.44824,0 1.77487,1.02715c-0.2001,0.51347 0,1.81438 0.44885,2.35698c1.80142,1.5428 1.12546,5.17023 -0.8739,5.17023c-2.4501,0 -3.12418,1.29999 -1.79855,3.62839c0.8978,1.30034 1.57352,1.54124 2.4476,0.51396c2.02628,-2.59999 2.45004,-0.51396 2.6752,9.8569c0,5.19881 0.44876,9.3409 0.89777,9.3409c1.10135,0 0.67645,5.71463 -0.89777,8.0425c-0.87604,1.29938 -0.87604,2.56857 -0.22516,3.62715c1.57529,2.32771 0,9.0696 -2.00067,9.0696c-1.77423,0 -5.12323,4.92755 -5.12323,7.25589c0,2.843 -2.87222,0 -3.54819,-3.11353c-0.67389,-2.84174 -0.67389,-2.84174 -1.1254,-0.78642c-0.42502,2.35881 2.00128,9.61391 4.02444,11.67049c1.32507,1.57253 -1.12537,4.17155 -2.89905,3.11304c-0.90131,-0.51335 -1.32529,-2.0546 -1.32529,-3.62624c0,-4.41434 -5.57187,-15.54044 -9.7973,-19.71204c-2.2467,-2.05713 -4.24588,-4.38486 -4.24588,-5.17009c0,-1.57181 -7.12408,-6.47 -11.12256,-8.04265c-2.2258,-0.78644 -2.89856,-0.51297 -2.89856,1.57265c0,1.5412 -0.42557,2.05464 -1.32529,1.5412c-1.99939,-1.02774 -2.90005,1.30063 -1.12482,3.62836c2.4501,2.84158 2.02454,6.22789 -0.65054,4.92746c-1.79758,-0.78526 -2.02258,-0.51405 -1.34879,3.90034c0.22409,2.57014 0.67603,5.95654 0.67603,7.49765c0,1.57201 0.44873,2.59978 0.89792,2.59978c0.65134,0 0.87643,-0.51384 0.42538,-1.29907c-0.22498,-0.78664 0.22595,-1.54243 1.12482,-1.54243c0.67599,0 1.32529,1.02829 1.32529,2.05586c0,1.05907 -0.87631,2.08565 -2.4501,1.81488c-1.3233,0 -2.44812,-0.75581 -2.44812,-1.26979c0,-2.35922 -5.99918,-18.4127 -7.7735,-20.77058c-1.99896,-2.57019 -0.67395,-3.35565 -16.46942,8.82782c-2.4478,1.81424 -5.12294,5.71413 -6.47308,8.55646c-1.09987,2.84122 -2.87517,5.71404 -3.77293,6.2281c-0.90001,0.51364 -4.22389,4.6561 -7.12413,9.06955c-12.47134,19.43857 -10.44577,21.76636 -9.57126,61.46356c3.77495,30.08105 3.77495,30.08105 3.77495,30.08105c-8.89825,0 -8.89825,0 -8.89825,0c-7.34604,0 -7.34604,0 -7.34604,0c0.67297,-27.75479 0.67297,-27.75479 0.67297,-27.75479c0.44888,-2.32626 0.67578,-7.01297 0.90074,-9.61279c0.22404,-1.54242 -6.24753,-8.28445 -6.02264,-9.82568c0,-1.30038 6.69714,2.32852 6.69714,1.02753c1.09985,-18.92496 0,-33.98151 -2.90018,-41.99377c-0.67296,-4.92802 -6.24826,-20.76874 -7.12144,-20.76874c-0.22504,0 -1.79897,-1.54305 -3.34923,-3.35678c-2.67447,-3.38507 -3.7729,-3.62772 -18.69403,-4.6562c-16.02075,-1.05721 -16.02075,-1.05721 -16.02075,-1.05721c-3.79817,3.62772 -3.79817,3.62772 -3.79817,3.62772c-2.22255,2.35822 -4.44887,3.89943 -5.09782,3.89943c-1.35028,0 -6.92397,5.44267 -9.34718,8.55589c-0.2249,0 -0.44901,-0.27077 -0.44901,-0.5135c-0.22487,0 -0.22487,0 -0.22487,-0.27194c-0.22395,-0.75511 -0.45148,-1.54233 -0.90034,-2.32777c1.34932,-1.30031 2.45023,-2.08673 2.89906,-1.81364c0.67387,0.51334 1.32523,0 1.32523,-1.30119c0,-1.29849 -1.32523,-1.81378 -4.87419,-1.29849c-4.24907,0.78534 -5.34935,1.05664 -6.02321,4.14084c-1.09998,1.57187 -1.32487,3.89978 -0.67404,5.714c-0.22594,2.32841 -0.22594,3.90048 0,3.90048c0.22507,0 0.45006,-0.5136 1.1228,-1.05861c0,0.27191 0.2251,0.54501 0.45197,0.78717c-2.2256,0.78506 -3.35104,3.11288 -3.12343,5.44064c-1.12532,1.05849 -2.22629,1.57251 -3.57663,2.35791c0,0 0,-0.27138 -0.19995,-0.27138c0.87637,-2.32834 1.32632,-4.92805 1.55029,-8.8278c0.45195,-4.38477 0.22498,-7.25578 -0.44897,-7.25578c-0.44887,0 -0.90137,1.05852 -0.90137,2.59908c0.22488,1.30124 -0.19995,2.6003 -1.09781,2.84238c-0.67598,0.27141 -1.12488,-0.24208 -1.12488,-1.54114c0,-3.11508 -0.87431,-3.11508 -2.87511,-0.27353c-0.89835,1.0585 -2.67218,2.32846 -4.22247,2.87323c-2.02565,0.75577 -2.67516,0.24174 -3.57507,-2.5997c-0.67381,-2.32782 -1.12273,-4.92958 -0.67381,-5.95674c0.22395,-1.30069 0.22395,-2.35735 -0.64896,-2.35735c-2.45016,0 -0.67595,-4.14275 2.22268,-4.92932zm19.14451,-59.61823c-1.34975,-0.27167 -2.44972,-1.02756 -2.89972,-2.08603c-0.2238,-1.54242 -0.44875,-1.54242 -0.44875,0c0,1.05847 -0.90051,1.81436 -1.77435,2.08603c-1.57376,0 -1.57376,0.27185 0.22495,1.30029c1.09781,0.51404 2.22325,1.29941 2.44815,1.29941c0.2,0 1.32492,-0.78537 2.44972,-1.29941c1.99921,-1.30029 1.99921,-1.30029 0,-1.30029zm176.49266,41.75159c0.42505,0.51367 0.8739,-0.27299 0.8739,-1.57201c0,-1.02936 -0.44885,-2.05641 -0.8739,-2.05641c-0.67581,0 -1.12476,0.51334 -1.12476,1.26917c0,0.78725 0.44894,1.84587 1.12476,2.35925zm-1.57379,2.3284c-0.22476,-0.78722 -1.32526,-1.81473 -2.22607,-1.81473c-0.64905,0 -1.09781,1.02751 -0.64905,1.81473c0.20001,0.78505 1.10004,1.299 1.99881,1.299c0.87631,0 1.10028,-0.51395 0.87631,-1.299zm-1.99911,11.66858c0.67386,0 1.57385,-0.27121 1.57385,-0.51332c0,-0.54446 -0.89999,-1.0585 -1.57385,-1.57234c-0.87601,-0.51331 -1.54984,-0.24207 -1.54984,0.51384c0,0.78719 0.67383,1.57182 1.54984,1.57182zm1.77435,-24.63864c0.8978,-0.51384 1.34976,-1.30045 1.12274,-2.05635c-0.67401,-1.84383 -4.44693,-1.84383 -4.44693,0c0,2.05635 1.32288,2.84152 3.32419,2.05635zm-12.22244,-19.44072c-1.12537,0.78719 -1.79947,2.32782 -1.57449,3.11504c1.12534,2.05524 2.45035,1.54115 3.57297,-1.81433c1.10062,-3.11496 0.65152,-3.62837 -1.99847,-1.3007zm-4.24948,39.93793c5.79926,6.98328 6.02332,7.2552 6.02332,4.92743c0,-1.29932 -0.44919,-2.35782 -1.12506,-2.35782c-0.64877,0 -1.77414,-1.30042 -2.44824,-2.84158c-0.64871,-1.54245 -1.99857,-3.11491 -3.09909,-3.11491c-2.02274,0 -2.02274,0.27306 0.64908,3.38689zm-4.67099,-12.2148c1.34674,0 1.99918,-0.51347 1.12177,-0.75583c-0.67276,-0.51334 -1.77341,-0.51334 -2.44659,0c-0.67752,0.24236 0,0.75583 1.32483,0.75583zm-6.448,-35.25024c0.67273,0.78529 2.67206,1.81245 4.44565,2.32835c3.12411,0.78481 3.34909,0.78481 1.57529,-1.30055c-2.02402,-2.57019 -7.5712,-3.35556 -6.02094,-1.0278zm-13.57242,-43.0209c-0.67419,0.75528 -0.89835,2.32779 -0.67419,3.35498c0.44931,2.08598 1.77527,0.27193 1.77527,-2.8415c0,-1.57259 -0.22501,-1.81474 -1.10107,-0.51348zm6.67206,55.99083c1.77487,1.29915 2.45139,1.29915 3.3511,-0.5153c1.77484,-2.84183 0.64914,-4.14032 -2.67508,-2.32784c-2.67407,1.27129 -2.67407,1.27129 -0.67603,2.84314zm-4.44617,-12.96992c3.34784,-2.8418 3.34784,-2.8418 0.67276,-2.8418c-1.79758,0 -3.12354,1.02739 -3.797,2.8418c-0.42484,1.81245 -0.87592,2.84174 -0.65192,2.84174c0,0 1.77524,-1.54262 3.77615,-2.84174zm-4.89899,42.02351c1.54785,2.84183 4.22296,2.84183 3.34921,-0.272c-0.22522,-1.02856 -0.45114,-2.32771 -0.45114,-2.60083c0,-0.24203 -0.89917,-0.24203 -1.99924,0.27312c-1.79855,0.5141 -1.79855,1.29915 -0.89883,2.59972zm-6.89896,-10.64214c1.77365,2.84183 2.67444,3.11304 4.67395,1.02776c1.32529,-1.29912 1.32529,-1.29912 0,-1.54124c-0.6741,0 -2.44827,-0.27306 -3.99799,-0.78716c-2.22623,-1.02705 -2.22623,-1.02705 -0.67596,1.30064zm-0.22409,-28.26822c1.12476,0 2.44977,-4.14188 1.7739,-5.44092c-0.87384,-1.30066 -2.6731,0.78537 -2.6731,3.11305c0,1.30038 0.44995,2.32787 0.8992,2.32787zm-10.89542,17.62601c-1.34985,1.05856 -1.12485,1.30089 0.64877,1.30089c1.12555,0 2.44809,-0.51544 2.90009,-1.30089c0.67307,-2.05585 -1.54968,-2.05585 -3.54886,0zm0.22495,22.82555c0.20001,0.27309 0.87289,-0.27203 1.54938,-1.5412c0.67361,-1.05852 2.67258,-2.35909 4.22162,-2.87283c1.99936,-0.78542 2.90045,-2.05457 2.90045,-3.90044c0,-4.38235 -3.12421,-3.08359 -6.44846,2.60091c-1.3501,2.8718 -2.44794,5.19943 -2.22299,5.71356zm-2.45132,-11.94148c1.99936,-2.84096 1.99936,-3.35678 0.42557,-4.14221c-1.77428,-1.02702 -3.09727,1.30125 -3.09727,5.44153c-0.22736,3.11494 -0.22736,3.11494 2.67171,-1.29932zm-3.57289,-30.59543c0.22495,2.08536 0.67383,1.81393 1.99908,-2.05652c1.57381,-4.14093 1.57381,-4.68597 0.2251,-4.68597c-0.87386,0 -1.77534,0.78589 -1.99924,2.08627c-0.44907,1.02753 -0.44907,3.38632 -0.22495,4.65622zm-1.09975,-21.25356c0,1.05717 0.42374,3.62741 0.87563,5.44116c0.67296,3.62897 0.67296,3.62897 1.34937,0.51405c0.87384,-3.11316 0,-7.76929 -1.34937,-7.76929c-0.65192,0 -0.87563,0.78534 -0.87563,1.81407zm-15.59351,8.55492c-1.10101,1.81403 -1.10101,3.62836 -0.22711,9.06995c0.45087,3.90001 1.57693,7.80034 2.2263,8.55615c1.12485,1.30055 1.34869,0 1.57362,-8.04121c0,-9.82545 -1.12469,-12.94038 -3.57281,-9.58488zm1.99919,27.48253c0.22389,0.51369 0.6729,-0.51335 0.44893,-2.0564c0,-1.57199 -0.22504,-1.81361 -0.67403,-0.78537c-0.20036,1.02785 -0.20036,2.32841 0.2251,2.84177zm8.02208,-24.36824c-0.22505,0.51407 -0.22505,4.14279 0.44862,8.04126c0.67618,6.74396 0.87666,7.01535 1.10164,2.08783c0.22377,-8.04248 -0.22498,-11.94278 -1.55026,-10.12909zm-7.57315,73.13371c1.34886,-3.11505 3.57295,-8.31445 5.12276,-11.42871c1.77435,-3.35564 2.89902,-7.76938 3.34814,-12.18346c0.65251,-6.98392 0.65251,-6.98392 0.65251,-6.98392c-2.67532,3.87007 -2.67532,3.87007 -2.67532,3.87007c-1.32533,2.08675 -2.22412,4.41446 -2.22412,5.19943c0,2.05658 -4.22397,15.02644 -5.54933,17.35487c-0.674,1.29878 -1.79874,4.17171 -1.99883,6.2274c-1.12527,5.95561 0.87607,4.92813 3.32419,-2.05569zm-15.79555,26.69598c0.67609,5.16924 0.67609,5.16924 2.89922,-5.95692c1.32471,-5.98589 3.3241,-15.56963 4.67406,-21.52626c1.77409,-7.52725 2.45003,-13.75531 2.45003,-22.55307c0,-11.42818 -0.22704,-11.66995 -2.00124,-10.369c-4.02196,3.35532 -6.24835,12.69682 -7.14607,30.83635c-0.42491,9.34309 -0.87599,18.68456 -1.32487,20.74101c-0.22495,2.08566 0,5.98608 0.44888,8.8279zm0.45108,-66.36166c0.87387,2.56953 1.77411,4.65546 1.77411,4.65546c0.22504,0 1.32298,-1.57184 2.22375,-3.62839c1.1248,-1.81248 2.89923,-3.8985 3.57312,-4.65434c2.65005,-2.35884 3.32402,-9.61482 1.1002,-14.54242c-1.77409,-4.41344 -6.67204,-9.34268 -7.57336,-7.77051c-0.44893,0.51343 -1.09782,5.44269 -1.5489,11.1555c-0.89871,8.55653 -0.89871,11.15742 0.45108,14.7847zm-1.34979,-59.37801c0.44983,0.51529 0.89871,0.24207 0.89871,-0.54328c0,-1.02898 -0.44888,-2.05641 -0.89871,-2.57014c-0.67659,-0.54476 -1.10039,-0.27136 -1.10039,0.75578c0,0.78539 0.4238,1.81437 1.10039,2.35765zm-72.10312,69.71677c3.10005,0.27328 3.10005,0.27328 3.10005,0.27328c3.12427,0 6.24828,-3.35687 6.24828,-6.22783c0,-1.81468 -0.22496,-1.81468 -9.34833,5.95454zm1.32593,-7.25514c0,0.78717 0.44887,1.57184 1.12521,1.57184c1.09792,0 4.22208,-4.65546 3.5481,-5.44087c-0.67587,-1.05841 -4.67331,2.32793 -4.67331,3.86903zm2.45023,-17.86832c3.34805,5.17155 4.8983,5.68491 6.67195,2.32784c1.79922,-3.11313 0.22513,-5.19881 -5.12474,-5.95456c-4.44748,-0.7872 -4.44748,-0.7872 -1.54721,3.62672zm-2.45023,-14.54054c0,0.54352 1.57422,1.81287 3.34804,2.87137c8.22232,4.92737 9.79628,4.92737 9.57208,0.24179c0,-2.84149 -3.349,-9.06964 -4.67375,-9.06964c-1.57439,0 -8.24637,4.92747 -8.24637,5.95648zm12.0224,36.82289c2.44814,0 2.67221,-0.7859 0.67284,-2.05495c-0.89983,-0.27345 -1.77383,0 -1.99773,0.75583c-0.45242,0.78473 0.22389,1.29912 1.32489,1.29912zm1.77428,-60.91888c-1.55031,-1.30122 -3.55159,-1.81431 -4.44937,-1.30122c-1.54987,1.02934 -1.32491,1.30122 0.89778,2.086c1.10143,0.5159 3.35114,1.02899 4.44952,1.27103c1.32462,0 1.32462,-0.51518 -0.89793,-2.0558zm-0.20045,9.34117c1.32335,0 1.55031,-0.27155 0.64935,-1.05717c-0.64935,-0.24159 -1.55034,-0.24159 -1.99921,0.2718c-0.22397,0.51382 0.44887,1.02789 1.34985,0.78537zm1.32335,5.95662c-3.12416,0 -3.12416,0.24203 -1.32335,2.32771c2.22313,2.3277 2.87206,2.5997 3.77353,1.02744c1.54958,-2.0546 0.44893,-3.35515 -2.45018,-3.35515zm4.44887,-29.29546c-0.90105,-1.30069 -1.12491,1.02777 -0.67397,3.86892c0.22485,1.81433 1.12292,3.38631 1.57428,3.38631c0.87395,0 0.22496,-5.71407 -0.90031,-7.25523zm7.12146,34.22288c-0.4494,0.24207 0.6761,1.81461 2.00174,3.1149c1.34941,1.29941 2.44713,1.8125 2.44713,1.02756c0,-1.81413 -3.77277,-5.20103 -4.44887,-4.14246zm-5.57224,1.81461c-1.99834,1.81439 -0.87283,6.46994 2.02365,7.25523c1.55034,0.51382 4.0005,2.59969 5.55032,4.65617c1.34941,2.08565 2.44713,2.87283 2.44713,2.08565c0,-2.59972 -8.89517,-15.05562 -10.0211,-13.99706zm9.12332,21.52625c-1.32538,-4.17322 -2.87498,-6.22849 -5.77423,-7.52919c-2.22316,-1.02705 -4.44936,-1.57185 -5.12325,-1.29845c-0.67612,0.27139 1.99919,3.62627 5.79907,7.52663c7.12222,6.7417 7.12222,6.7417 5.0984,1.30101zm11.82002,-39.93767c-0.44904,0 -0.90092,1.02715 -0.90092,2.05431c0,1.30058 0.45189,2.08662 0.90092,2.08662c0.64937,0 1.1013,-0.78604 1.1013,-2.08662c0,-1.02716 -0.45193,-2.05431 -1.1013,-2.05431zm-2.0228,21.25294c0,1.81401 3.79691,0.51401 5.34729,-1.81435c2.22264,-3.90036 1.99872,-4.92747 -0.90144,-4.92747c-1.99757,0 -4.44585,3.62869 -4.44585,6.74182zm6.47215,-55.9914c-0.67595,3.35583 -1.12486,6.19674 -0.90096,6.46991c0.67598,1.02809 2.45087,-6.74122 2.45087,-9.85616c0,-1.2991 -0.67606,0.27315 -1.54991,3.38625zm11.57104,52.36268c-1.12495,0 -1.99873,0.51559 -1.99873,1.54245c0,0.78589 0.64891,1.30093 1.32272,1.30093c0.89983,0 1.77422,-0.51505 2.0013,-1.30093c0.44888,-1.02686 -0.22708,-1.54245 -1.32529,-1.54245zm-2.67474,48.7356c1.32492,4.68721 3.3241,9.07024 4.44891,10.12802c1.12491,0.786 3.34804,4.4144 4.67432,8.04263c1.32492,3.62769 2.67368,6.46919 2.89864,6.46919c1.09845,0 -1.12488,-23.85269 -2.67453,-31.11017c-1.35042,-6.22586 -1.77437,-11.94048 -1.55038,-21.01036c0.19997,-6.74196 0,-12.69865 -0.44901,-13.21248c-0.2238,-0.51335 -1.77412,-0.51335 -3.12404,0c-2.45003,1.02716 -2.67412,1.81442 -2.67412,7.52901c0,4.38309 -0.44986,6.742 -1.54979,7.76871c-3.12401,2.3284 -2.9001,15.54022 0,25.39545zm-6.44879,-34.73666c-0.44876,-3.90005 -0.8976,-4.41344 -3.34846,-4.41344c-2.89903,0 -2.89903,0.27136 -2.67404,5.71284c0,3.35687 0.45091,7.25714 0.67581,9.06972c0.22394,1.81445 1.09991,3.62825 1.99823,3.90018c1.77481,1.30072 3.77304,-7.76924 3.34846,-14.2693zm-3.34846,26.18076c-1.99823,-3.11383 -3.34793,-6.46855 -3.5484,-7.25516c0,-1.02821 -1.12495,-3.62733 -2.44775,-5.95564c-1.35031,-2.32774 -2.89905,-5.20053 -3.5751,-6.22786c-2.22408,-3.62895 -1.77521,-0.51396 0.67606,7.52721c1.54874,5.4429 4.22185,10.37029 7.34592,14.51244c5.77425,7.01344 6.4481,5.71336 1.54929,-2.60098zm-3.5484,12.72807c2.42305,0 2.22301,-0.27155 -1.12495,-4.41373c-2.22417,-2.59966 -3.77301,-5.44154 -3.77301,-6.74248c0,-1.02736 -2.9001,-4.6857 -6.24806,-8.04042c-3.3241,-3.38634 -6.44823,-6.74225 -6.89711,-7.77068c-0.45198,-1.29932 -0.67609,-1.29932 -0.67609,0.24205c0,1.57162 -1.09819,1.8138 -4.67439,1.02728c-2.44817,-0.51408 -4.4469,-0.51408 -4.4469,-0.24091c0,0.51402 0.89908,3.62709 1.79886,6.74225c1.5504,5.16924 2.22421,6.22791 7.12196,8.28278c3.09918,1.30072 7.99745,4.41391 11.12163,6.74168c2.9001,2.35934 6.44823,4.17216 7.79807,4.17216zm-34.73961,8.7977c0.901,0 2.22591,-0.51334 3.12369,-1.29987c1.55032,-1.81319 0.2274,-1.81319 -2.67166,0c-1.32628,0.78653 -1.55026,1.02863 -0.45203,1.29987zm-2.44809,-6.46974c2.22379,-1.05687 9.34718,-2.08621 15.8204,-2.08621c12.22047,-0.24174 14.67024,-1.02702 9.77229,-2.59969c-1.5504,-0.51331 -5.09834,-1.81422 -7.99852,-3.11301c-5.12268,-2.32852 -15.5955,-1.54243 -16.6933,1.05722c-0.2269,0.51462 -1.3499,0.78662 -2.45024,0.51462c-2.2236,-0.78651 -4.44987,1.29907 -5.12267,5.44156c-0.90152,3.35562 0.67279,3.62877 6.67203,0.78551zm-17.79466,5.95641c0.44896,2.08589 2.67517,2.32773 4.44952,0.51334c1.09874,-1.02736 1.09874,-1.54057 0,-3.11305c-0.90051,-1.54245 -1.54941,-1.54245 -2.89925,-0.24211c-0.90137,0.7561 -1.55028,2.0553 -1.55028,2.84183zm-7.12106,18.14003c0.87292,0 1.32288,0.78537 0.87292,2.32777c-0.20001,1.05858 -0.87292,2.08574 -1.32487,2.08574c-0.6729,0 -1.09834,-1.02716 -1.09834,-2.08574c0,-1.2693 0.64943,-2.32777 1.55029,-2.32777z';

var path = new CompoundPath(tree);
path.fillColor = 'black';
</script>

最佳答案

您正在从2013年12月1日发布的GitHub加载v0.9.15。在该版本中,CompoundPath构造函数尚不支持SVG字符串参数。较新的版本应与此SVG构造函数一起正常工作。

10-04 15:47