Skip to content

Add optional image shadow props#1147

Merged
gitbrent merged 2 commits intogitbrent:masterfrom
pitch-io:image-shadow-props
Jan 26, 2023
Merged

Add optional image shadow props#1147
gitbrent merged 2 commits intogitbrent:masterfrom
pitch-io:image-shadow-props

Conversation

@seekuehe
Copy link
Contributor

Description
This PR takes the shape shadow implementation and adapts it to images.
Related to Issue #986

Example

let pptx = new PptxGenJS();
let slide = pptx.addSlide();

slide.addImage({
  x: 1,
  y: 1,
  path: "https://images.unsplash.com/photo-1506744038136-46273834b3fb?crop=entropy&cs=tinysrgb&fit=max&fm=jpg&ixid=MnwyMTIyMnwwfDF8c2VhcmNofDJ8fGxhbmRzY2FwZXxlbnwwfHx8fDE2NTg5MzE0MDM&ixlib=rb-1.2.1&q=80&w=1080",
  shadow: {
    type: "outer",
    angle: 90,
    blur: 10,
    color: "000000",
    offset: 4,
    opacity: 0.5
  }
});

pptx.writeFile({ fileName: "PptxGenJS-Sandbox.pptx" });

Sample PPT files:
PptxGenJS-Shadows.pptx
PptxGenJS_Demo_Image_20220811112738439.pptx

@seekuehe seekuehe marked this pull request as ready for review August 11, 2022 11:29
@gitbrent gitbrent self-assigned this Aug 14, 2022
@gitbrent gitbrent added this to the 3.12.0 milestone Aug 14, 2022
@gitbrent gitbrent merged commit 1c4289a into gitbrent:master Jan 26, 2023
@gitbrent
Copy link
Owner

Thanks @seekuehe !

gitbrent added a commit that referenced this pull request Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants