gpt4 book ai didi

tcpdf - TCPDF 中的投影

转载 作者:行者123 更新时间:2023-12-04 18:21:36 27 4
gpt4 key购买 nike

我相信 TCPDF 中没有本地方法来创建阴影。我有什么想法可以用其他方法创造这样的效果吗?我首先考虑在每个边缘(对于矩形)旁边创建一个小渐变,但发现没有办法创建具有不同 Alpha channel 的渐变。

最佳答案

类似这样的事情:

class MYPDF extends TCPDF {
public function addShadow($x,$y,$h,$w){

for($i=5;$i>=1;$i-=0.5){
$this->SetAlpha(0.1-($i*0.02));
$this->SetFillColor(0, 0, 0);
$this->SetDrawColor(0, 0, 0);
$this->Rect($x+$i, $y+$i, $h, $w, 'DF');
}

$this->SetAlpha(1);
}
}

关于tcpdf - TCPDF 中的投影,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10551847/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com