Repository navigation
3.19.0
·
19 commits
to master
since this release
Immutable
release. Only release title and notes can be modified.
3.19.0
New
image.dropShadow({ x, y, blur, spread, color, expand }): a shadow behind the image, shaped by its alpha. Without an offset it is a glow:image.dropShadow({ blur: 8, spread: 2, color: 0xff2fb9ff }). The image grows to fit it, unlessexpand: false.image.outline({ width, color, expand }): an outline around the image's shape, the sticker effect for cut-out images or an outline for rendered text. It follows the edge's antialiasing, like thestrokeWidthofrenderText()does.Image.linearGradient(width, height, { stops, angle })andImage.radialGradient(width, height, { stops, x, y, radius }): images with a gradient, with the angle like CSS'linear-gradient().stopsare positions and colors likeColors.gradient()takes them, or just the colors, evenly spaced.image.recolor(otherImage): takes the colors from another image of the same size and keeps the alpha. With a gradient it fills a shape, e.g. gradient text:text.recolor(Image.linearGradient(text.width, text.height, { stops: [0x22d3eeff, 0xfb923cff], angle: 90 })).