我對圖像有一個水印,我想用php創建它的陰影GD.how我可以計算距離,陰影有多遠以及在什麼位置位置,如果我有隻從水印通過角度和距離得到x和y的陰影位置php
for example
$shadowAngle = 90;// in radian
$shadowDistance = 100// in % means 100 percent away from watermark
$watermark_x = 320; //width of watermark
$watermark_y = 320; //height of watermark
$watermark_Pointx = 640; // x of watermark on background Image
$watermark_Pointy = 140; // y of watermark on background Image
$shadow_Pointx = ? // x of shadow on background Image
$shadow_Pointy = ? // y of shadow on background Image
如何可以通過使用$ shadowAngle計算影子的開始點($ shadow_Pointx,$ shadow_Pointy)和$ shadowdistance
100%?水印的寬度和高度? –
'$ watermark_x'和'$ watermark_y'是水印的寬度和高度 – Anni