チェンジセット 3533: as3/gunyarapaint
- コミット日時:
- 2010/03/13 19:30:33 (3 年前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as3/gunyarapaint/branches/gunyarapaint/framework/src/org/libspark/gunyarapaint/framework/Recorder.as
r3524 r3533 19 19 public static const DEFAULT_UNDO_MAX:uint = 16; 20 20 21 public function Recorder( width:uint, height:uint, bytes:ByteArray, commands:CommandContext)21 public function Recorder(bytes:ByteArray, width:uint, height:uint, commands:CommandContext) 22 22 { 23 23 m_bytes = bytes; … … 34 34 * @param undo やり直しできる回数 35 35 */ 36 public static function create( width:int, height:int, undo:int):Recorder36 public static function create(bytes:ByteArray, width:int, height:int, undo:int):Recorder 37 37 { 38 var bytes:ByteArray = new ByteArray();39 38 var commands:CommandContext = new CommandContext(); 40 39 var version:uint = PAINTER_LOG_VERSION; … … 42 41 bytes.position = 0; 43 42 var signature:String = "GUNYARA_PAINT:" 44 + (version / 100) + ":"45 + ((version % 100) / 10) + ":"46 + (version % 10) + ":"43 + uint(version / 100) + "." 44 + uint((version % 100) / 10) + "." 45 + uint(version % 10) + ":" 47 46 bytes.writeUTFBytes(signature); 48 47 bytes.writeShort(width); 49 48 bytes.writeShort(height); 50 49 bytes.writeShort(undo); 51 var recorder:Recorder = new Recorder( width, height, bytes, commands);50 var recorder:Recorder = new Recorder(bytes, width, height, commands); 52 51 recorder.setUndo(new UndoStack(recorder, undo)); 53 52 return recorder;

