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

use uint (primitive type) instead of using Point class

ファイル:

凡例:

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

    r3524 r3574  
    3939                y = bytes.readShort(); 
    4040            } 
    41             readCoordinate.x += x; 
    42             readCoordinate.y += y; 
     41            s_readCoordinateX += x; 
     42            s_readCoordinateY += y; 
    4343        } 
    4444         
    4545        public function write(bytes:ByteArray, args:Object):void 
    4646        { 
    47             var dx:int = args.x - writeCoordinate.x
    48             var dy:int = args.y - writeCoordinate.y
     47            var dx:int = args.x - s_writeCoordinateX
     48            var dy:int = args.y - s_writeCoordinateY
    4949            if (dx >= -4 && dx <= 3 && dy >= -4 && dy <= 3) { 
    5050                // dxもdyも3bitに収まる場合 
     
    6060                bytes.writeShort(dy); 
    6161            } 
    62             writeCoordinate.x = args.x; 
    63             writeCoordinate.y = args.y; 
     62            s_writeCoordinateX = args.x; 
     63            s_writeCoordinateY = args.y; 
    6464        } 
    6565         
     
    6767        { 
    6868            painter.lineTo( 
    69                 readCoordinate.x || writeCoordinate.x
    70                 readCoordinate.y || writeCoordinate.y 
     69                s_readCoordinateX || s_writeCoordinateX
     70                s_readCoordinateY || s_writeCoordinateY 
    7171            ); 
    7272        }