2006-02-06から1日間の記事一覧

画像回転(2)

int cos = Math::cos( rotate ); int sin = Math::sin( rotate ); int y,x; int yy,xx; for( y = 0 , yy = -h / 2 ; y < h ; y++ , yy++ ){ for( x = 0 , xx = -w / 2 ; x < w ; x++ , xx++ ){ if( src[ x ] != key ){ int u = ((cos * xx + sin * yy) >> 15…