チェンジセット 3533

差分発生行の前後
無視リスト:
コミット日時:
2010/03/13 19:30:33 (3 年前)
コミッタ:
hkrn
ログメッセージ:

changed order of arguments at #create and constructor, and fixed a bug at writing version signature

ファイル:

凡例:

変更無し
追加
削除
更新
コピー
移動
  • as3/gunyarapaint/branches/gunyarapaint/framework/src/org/libspark/gunyarapaint/framework/Recorder.as

    r3524 r3533  
    1919        public static const DEFAULT_UNDO_MAX:uint = 16; 
    2020         
    21         public function Recorder(width:uint, height:uint, bytes:ByteArray, commands:CommandContext) 
     21        public function Recorder(bytes:ByteArray, width:uint, height:uint, commands:CommandContext) 
    2222        { 
    2323            m_bytes = bytes; 
     
    3434         * @param undo やり直しできる回数 
    3535         */ 
    36         public static function create(width:int, height:int, undo:int):Recorder 
     36        public static function create(bytes:ByteArray, width:int, height:int, undo:int):Recorder 
    3737        { 
    38             var bytes:ByteArray = new ByteArray(); 
    3938            var commands:CommandContext = new CommandContext(); 
    4039            var version:uint = PAINTER_LOG_VERSION; 
     
    4241            bytes.position = 0; 
    4342            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)          + ":" 
    4746            bytes.writeUTFBytes(signature); 
    4847            bytes.writeShort(width); 
    4948            bytes.writeShort(height); 
    5049            bytes.writeShort(undo); 
    51             var recorder:Recorder = new Recorder(width, height, bytes, commands); 
     50            var recorder:Recorder = new Recorder(bytes, width, height, commands); 
    5251            recorder.setUndo(new UndoStack(recorder, undo)); 
    5352            return recorder;