Translation:Rotated Page Item

From IDMLWiki

Jump to: navigation, search
ページオブジェクトの回転

下記の例は図形を中心として30度回転したページオブジェクトの例です。パスポイントの座標と図形の境界線は前述の例と同じです。変換行列のみ変更しています。

一般的に、左回りさせるには、変換行列を次のように記述します。

a = cos(角度), b =-sin(角度), c = sin(角度), d = cos(角度)

ここで、a、b、cおよびdは変換行列の最初の4つの値で、「角度」は回転角度です。

IDMLの例19 ページオブジェクトの回転
  1. <Rectangle Self="ucd" ItemTransform="0.8660254037844387 -0.5 0.5 0.8660254037844387 0 0">
  2.   <Properties>
  3.     <PathGeometry>
  4.       <GeometryPath PathOpen="false">
  5.         <PathPointArray>
  6.           <PathPointType Anchor="72 -324" LeftDirection="72 -324" RightDirection="72 -324"/>
  7.           <PathPointType Anchor="72 -252" LeftDirection="72 -252" RightDirection="72 -252"/>
  8.           <PathPointType Anchor="144 -252" LeftDirection="144 -252" RightDirection="144 -252"/>
  9.           <PathPointType Anchor="144 -324" LeftDirection="144 -324" RightDirection="144 -324"/>
  10.         </PathPointArray>
  11.       </GeometryPath>
  12.     </PathGeometry>
  13.   </Properties>
  14. </Rectangle>
図16 ページオブジェクトの回転

Image:Fig016.png

下記は変換行列の例です。

a = 0.8660254037844387 = コサイン30度

b = -0.5 = サイン-30度

c = 0.5 = サイン30度

d = 0.8660254037844387 = コサイン30度

Personal tools