Develop and Download Open Source Software

Recent Changes

2012-04-17
2012-04-03
2012-02-11
2011-11-09

Wiki Guide

Side Bar

  • class SWFEditor function applyShapeMatrixFactor($shape_id, $scale_x, $scale_y, $rotate_rad, $trans_x, $trans_y)

説明

シェイプに張り付ける画像のスケール/回転/移動に対して操作を行います。

引数

  • int $shape_id (操作対象 SHAPE の ID)
  • int $scale_x, $scale_y (X 方向、Y 方向に対して現在の倍率から更に何倍するかを指定します)
  • float $rotate_rad (回転を指定します。単位は radian です) ※ 実験段階です。機能が変わる可能性があります
  • int $trans_x, $trans_y (X 方向、Y 方向に対して現在の移動から更にどの位ずらすかを指定します)

戻り値

  • boolean $result (true:成功, false:失敗)

使用例

<?php
$obj 
= new SWFEditor();
$obj->input($swfdata);
$obj->applyShapeMatrixFactor($shape_id22M_PI/200); // (表示倍率を縦横2倍ずつ拡げて、1/4 回転する)
echo $obj->output();

注意

引数 $rotate_rad に対する処理結果があまり実用的でないので、機能が変わる可能性があります。 (0, 0)原点に対する回転なので 180 度回転すると見えなくなりますし… 普通画像の中心に対して回転するのを期待するかなと…

参考


SourceForge.JP is a Japanese version of SourceForge.net. For developments that are not related to Japan, we recommend you to use SourceForge.net.