mirror of
https://github.com/storytold/deckcraft.git
synced 2026-11-20 17:14:49 +00:00
Shape Fill: the gradient help says which kinds rotateWithShape keeps upright (#1843)
With rotateWithShape false, the renderer lays linear and radial gradients out upright on the slide, while rectangular and path gradients still turn with the shape. The shape.fill params doc now says so.
This commit is contained in:
1 parent
fc18a78e65
commit
85de6ca5d7
3 files changed
+6
-2
No files matched your search
@@ -74,7 +74,8 @@ pub(super) fn change(s: &mut Session, p: &Value) -> Result<Value> {
|
||||
|
||||
/// `{stops: [[pos 0–1, color], …], kind?: linear|radial|rectangular|path, angle?: deg (linear),
|
||||
/// focus?: [l, t, r, b] fractions (radial/rectangular/path: where the first stop sits),
|
||||
/// rotateWithShape?}`.
|
||||
/// rotateWithShape?}`. The renderer keeps only linear and radial gradients upright when
|
||||
/// `rotateWithShape` is false; rectangular and path gradients turn with the shape.
|
||||
pub(crate) fn gradient_param(v: &Value) -> Option<Gradient> {
|
||||
let stops: Vec<GradientStop> = v
|
||||
.get("stops")?
|
||||
|
||||
Reference in new issue
Block a user