Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Text with fill property shadow angle and blur issue #1366

Open
1 of 4 tasks
caglartufan opened this issue Dec 18, 2024 · 1 comment
Open
1 of 4 tasks

[BUG] Text with fill property shadow angle and blur issue #1366

caglartufan opened this issue Dec 18, 2024 · 1 comment

Comments

@caglartufan
Copy link

I'm trying to add a Text element to a slide using the code below:

slide.addText('TEST 360 DEGREES', {
  x: 2,
  y: 0,
  w: 3,
  h: 1,
  fill: '00FF00',
  fontFace: 'Arial',
  fontSize: 16,
  shadow: {
    type: 'outer',
    angle: 360,
    color: '000000',
    blur: 0,
    offset: 5,
    opacity: 0.5,
  },
});

This code successfully adds a Text element to the PPTX document but the shadow angle doesn't seem to work properly. I tried to set different values for angle proeprty like 0, 90, 180, 270, 360 but they don't work properly.

Another issue is that whenever I set shadow blur to 0, it causes the shadow to have blur of 8 points. Other values working well (blur > 0). Didn't try the negative values as it doesn't make sense.

Issue Category

  • Enhancement
  • Bug
  • Question
  • Documentation gap/issue

Product Versions

  • Please specify what version of the library you are using......: [3.12.0]
  • Please specify what version(s) of PowerPoint you are targeting: Latest versions of Office PowerPoint and 365 PowerPoint Web
  • Please specify what web browser you are using.................: Google Chrome

Desired Behavior

I expect the set shadow angle to work properly, when I set angle to 0 and 180 they should be reverse to each other and same for 270 and 90 degrees.

I also expect to be able to set shadow blur to 0 causing a shadow with crisp edges, no blur.

Observed Behavior

I took screenshot of different angle and 0 blur properties' outputs from Ubuntu's LibreOffice. Same outputs can be observed with 365 Office Mobile application. I can't see any shadow in Office 365 Web though I don't know why.

0 degrees angle and 0 blur:
test-0

90 degrees angle and 0 blur:
test-90

180 degrees angle and 0 blur:
test-180

270 degrees angle and 0 blur:
text-270

360 degrees angle and 0 blur:
test-360

Steps to Reproduce

Simply run the above code to add Text and change angle values and set blur to 0.

@caglartufan
Copy link
Author

UPDATE: I was wrong with 360 degree one since we can't set angle to 360. Documentation says valid angle values are 0-359. I set it to 359 and I'm fine with that. We can't set 0 degrees angle though.

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

No branches or pull requests

1 participant