验证中...
开源中国 2018 年度最后一场技术盛会邀你来约~错过就要等明年啦!点此立即预约
语言: PHP
分类: 图形图像处理
最后更新于 2018-10-16 13:44
gistfile1.txt
原始数据 复制代码
$Xi = floor($X);
$Yi = floor($Y);
if( $Xi == $X && $Yi == $Y){
$this->drawAlphaPixel($X,$Y,array('Alpha'=>$Alpha,'R'=>$R,'G'=>$G,'B'=>$B));
}else{
$Alpha1 = (1 - ($X - $Xi)) * (1 - ($Y - $Yi)) * $Alpha;
$this->drawAlphaPixel($Xi,$Yi,array('Alpha'=>$Alpha1,'R'=>$R,'G'=>$G,'B'=>$B));
$Alpha2 = ($X - $Xi) * (1 - ($Y - $Yi)) * $Alpha;
$this->drawAlphaPixel($Xi+1,$Yi,array('Alpha'=>$Alpha2,'R'=>$R,'G'=>$G,'B'=>$B));
$Alpha3 = (1 - ($X - $Xi)) * ($Y - $Yi) * $Alpha;
$this->drawAlphaPixel($Xi,$Yi+1,array('Alpha'=>$Alpha3,'R'=>$R,'G'=>$G,'B'=>$B));
$Alpha4 = ($X - $Xi) * ($Y - $Yi) * $Alpha;
$this->drawAlphaPixel($Xi+1,$Yi+1,array('Alpha'=>$Alpha4,'R'=>$R,'G'=>$G,'B'=>$B);
}

评论列表( 0 )

你可以在登录后,发表评论

搜索帮助

12_float_left_people 12_float_left_close