mirror of
https://github.com/jxxghp/MoviePilot-Frontend.git
synced 2026-09-05 15:36:49 +08:00
🚨 0
This commit is contained in:
@@ -121,18 +121,18 @@ async function drawImages(imageList: string[]) {
|
|||||||
img.width,
|
img.width,
|
||||||
img.height,
|
img.height,
|
||||||
x,
|
x,
|
||||||
canvas.height - (POSTER_HEIGHT + MARGIN_HEIGHT + REFLECTION_HEIGHT), // 倒影位置在海报下方,考虑画布翻转
|
0,
|
||||||
POSTER_WIDTH,
|
POSTER_WIDTH,
|
||||||
REFLECTION_HEIGHT,
|
REFLECTION_HEIGHT,
|
||||||
)
|
)
|
||||||
|
|
||||||
const gradient = ctx.createLinearGradient(0, canvas.height - (POSTER_HEIGHT + MARGIN_HEIGHT + REFLECTION_HEIGHT), 0, canvas.height - (POSTER_HEIGHT + MARGIN_HEIGHT))
|
const gradient = ctx.createLinearGradient(0, 0, 0, canvas.height - (POSTER_HEIGHT + MARGIN_HEIGHT))
|
||||||
|
|
||||||
gradient.addColorStop(0, 'rgba(0, 0, 0, 1)')
|
gradient.addColorStop(0, 'rgba(0, 0, 0, 1)')
|
||||||
gradient.addColorStop(1, 'rgba(0, 0, 0, 0.7)')
|
gradient.addColorStop(1, 'rgba(0, 0, 0, 0.7)')
|
||||||
ctx.globalCompositeOperation = 'destination-out';
|
ctx.globalCompositeOperation = 'destination-out';
|
||||||
ctx.fillStyle = gradient
|
ctx.fillStyle = gradient
|
||||||
ctx.fillRect(x, canvas.height - (POSTER_HEIGHT + MARGIN_HEIGHT + REFLECTION_HEIGHT), POSTER_WIDTH, REFLECTION_HEIGHT)
|
ctx.fillRect(x, 0, POSTER_WIDTH, REFLECTION_HEIGHT)
|
||||||
|
|
||||||
ctx.restore()
|
ctx.restore()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user