Skip to content

add linear gradient support#1295

Open
sambauers wants to merge 1 commit intogitbrent:masterfrom
sambauers:gradients
Open

add linear gradient support#1295
sambauers wants to merge 1 commit intogitbrent:masterfrom
sambauers:gradients

Conversation

@sambauers
Copy link

@sambauers sambauers commented Oct 19, 2023

  • no build files included in this commit
  • should work on shapes, text, charts, and tables
  • only a basic demo on shapes included

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',
 	},
 });

* no build files included in this commit
* should work on shapes, text, charts, and tables
* only a basic demo on shapes included
@w2048185182
Copy link

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

@niels-bosman
Copy link

@gitbrent Could you have a look at this?

@xunyucheng
Copy link

Which version can this update be used on?

@xunyucheng
Copy link

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

麻烦问下,哪个版本这个示例能生效?

@markentingh
Copy link

this is great, i will add this to my version of pptxGenJs thank you for this

@XiaoBuLiuKun
Copy link

给大佬说666,初步使用状况正常。
你好我想问一下你是使用的哪一个版本,我使用的是4.0.1版本,目前是复现不出来这个demo

@XiaoBuLiuKun
Copy link

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

麻烦问下,哪个版本这个示例能生效?

你现在这个是否生效了呢

@markentingh
Copy link

why hasn't this been merged yet? It's been 2 years now since this guy introduced linear gradients and still no support?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants