gitbrent / PptxGenJS

Create PowerPoint presentations with a powerful, concise JavaScript API.
https://gitbrent.github.io/PptxGenJS/
MIT License
2.94k stars 639 forks source link

add linear gradient support #1295

Open sambauers opened 11 months ago

sambauers commented 11 months ago

Example usage:

slide.addShape(pptx.shapes.RECTANGLE, {
    x: 5.1,
    y: 6,
    w: 3.0,
    h: 1,
    fill: {
        type: "linearGradient",
        stops: [
            { position: 0, color: '000000', transparency: 10 },
            { position: 100, color: '333333', transparency: 50 },
        ],
        angle: 45,
        scaled: 1,
        rotWithShape: false,
        tileRect: { t: 0, r: 0.5, b: 0.25, l: 1 },
        flip: 'xy',
    },
 });
w2048185182 commented 8 months ago

给大佬说666,初步使用状况正常。

niels-bosman commented 4 months ago

@gitbrent Could you have a look at this?