SIEについて情報交換するための
SIEについて情報交換するための
2010年 2月 7日 (日) 02:21:58 JST
revulo です。 > In my opinion, you should consider the possibility of > this transformation to cubic Bezier, if you desire that VML simulates SVG arc > command. 私が書いた元の文も少しおかしかったので、修正案を示しておきます。 In my opinion, you should consider this translation to cubic Bezier, if you desire to emulate SVG arc command by VML. 前の文と対応付けるなら、transformation ではなく translation にすべきでした。 それと、少なくとも simulate の主語は、人にしておかないと変なのですが、 simulate という単語は、計算によるシミュレーションというイメージが強いので、 やはり emulate 辺りの単語が適切ではないかな? と思います。 emulation library なんていう言い方もありますので。 あと、Ample SDK のコードを眺めた感じでは、CTM の計算を行っていないようなので、 CTM を用いた座標変換についても、説明しておいた方がいいのかもしれません。 蛇足かもしれませんが、こんな実例も書いておいてはどうでしょう? Additionally, I show the example of coordinate transformation performed in SIE. For example, please think of this simple SVG. <svg xmlns="http://www.w3.org/2000/svg"> <g transform="rotate(30)"> <g transform="rotate(30)"> <line x1="0" y1="0" x2="100" y2="0" style="stroke:red;" /> </g> </g> </svg> SIE analyzes this SVG and creates a current transformation matrix (CTM) for rotation of 60 degree. SIE transforms the coordinates of each point using this matrix, and then generates the following VML. <v:shape strokecolor="red" strokeweight=".75pt" path="m0,0 l50,86 e"> In this way, SIE converts SVG into VML. (和訳) 補足として、SIE の中で行われている座標変換について、実例を示しておきます。 例えば、こんな SVG を考えてみて下さい。 (元の SVG) SIE はこの SVG を解析して、60度回転という変換行列 (CTM) を作り出します。 さらに、各点の座標をこの変換行列で変換し、次のような VML を生成します。 (生成された VML) SIE では、このようにして SVG を VML に変換しています。 -- revulo <revul****@gmail*****> 2010年2月6日20:56 SIEについて情報交換するためのメーリングリスト <sie-d****@lists*****>: > 返事の案が出来上がりましたので、明日、Sergeyさんへメールを送信するつもりです。 > > 返答案を以下に載せておきます。 > > Hello, Sergey. > OK, I understand what your problem is. > SIE translates SVG arc command into cubic Bezier curves, because VML arc > command cannot render a transformed arc. > > In my opinion, you should consider the possibility of > this transformation to cubic Bezier, if you desire that VML simulates SVG arc > command. > > See SIE code. (http://sourceforge.jp/projects/sie/svn/view/trunk/sie.js?view=markup&revision > =1598&root=sie) > >>STArc.prototype.set = function starcset(x1, y1, rx, ry, psai, fA, fS, x4, y4) { >>... >> this.D = (this.D ? this.D.concat(nea) : nea); >> nea = null; >> return true; >>}; > > Each argument 'x1, y1, rx, ry, psai, fA, fS, x4, y4' is a parameter of SVG arc command. > 'this.D' is a set of parameters of cubic Bezier curves. > > おかしな点があれば、管理人までメールを下さい。 > > SIE プロジェクト 管理人 > > dhrname (sie-d****@lists*****) > > _______________________________________________ > Sie-developers mailing list > Sie-d****@lists***** > http://lists.sourceforge.jp/mailman/listinfo/sie-developers >