验证中...
Languages: PHP
Categories: 图形图像处理
Latest update 2018-12-09 10:37
gistfile1.txt
Raw Copy
$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);
}

Comment list( 0 )

You need to Sign in for post a comment

Help Search