10 2011 档案
摘要:图片旋转,顺时针点旋转 其实很容易,把算法提出来后就那么一点点 用JAVA写了一遍 double PI = 3.14159265;double angle = 0;double angle_cos = 0;double angle_sin = 0;angle = 40 * PI / 180;angle_cos = Math.cos(angle);angle_sin = Math.sin(angle);int x = 40;int y = 20;int mx = 10;int my = 18;x -= mx;y -= my;double newx = x * Math.cos(angle) +.
阅读全文
摘要://平滑图片//原理:如果周边8个点,》4个是背景色,则改点改背景色,如果》4是前景色,则改前景色//边框无处理int Effect::Smooth(){//周边8色// 0 1 2// 3 * 4// 5 6 7bmpcolor pixColor[8];//计数器int bg_count = 0;int f_count = 0;for (int x = 2; x <= this->bmpInfo.biWidth - 1;x++){for (int y = 2; y <= this->bmpInfo.biHeight - 1;y++){bg_count = 0;f_co
阅读全文

浙公网安备 33010602011771号