Skip to content

Set Rounded Corners on Rectangle - #880

Merged
Progi1984 merged 20 commits into
PHPOffice:masterfrom
seanlynchwv:feature/set-rounded-rect-corners
Aug 13, 2026
Merged

Set Rounded Corners on Rectangle#880
Progi1984 merged 20 commits into
PHPOffice:masterfrom
seanlynchwv:feature/set-rounded-rect-corners

Conversation

@seanlynchwv

@seanlynchwv seanlynchwv commented Sep 8, 2025

Copy link
Copy Markdown
Contributor

Description

It's now possible to set the radius to create rounded corners on rectangle shapes.

        $panel = new AutoShape();
        $panel->setType(AutoShape::TYPE_ROUNDED_RECTANGLE)
            ->setOffsetX($x)
            ->setOffsetY($y)
            ->setWidth($w)
            ->setHeight($h)
            ->setRoundRectCorner(4); // new

Previously the corners were hard coded to a large value making custom designs difficult.

Fixes # (issue)
#854

Checklist:

  • My CI is 🟢
  • I have covered by unit tests my new code (check build/coverage for coverage report)
  • I have updated the documentation to describe the changes
  • I have updated the changelog

@auto-assign
auto-assign Bot requested a review from Progi1984 September 8, 2025 15:09
@seanlynchwv seanlynchwv changed the title Set Rounded Corners on Rectable Set Rounded Corners on Rectangle Sep 8, 2025
@coveralls

coveralls commented Sep 8, 2025

Copy link
Copy Markdown

Coverage Status

coverage: 91.62% (+0.004%) from 91.616% — seanlynchwv:feature/set-rounded-rect-corners into PHPOffice:master

@Progi1984 Progi1984 added this to the 1.3.0 milestone Oct 24, 2025

@Progi1984 Progi1984 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some feedbacks

Comment thread docs/changes/1.2.0.md Outdated
Comment thread src/PhpPresentation/Shape/AutoShape.php Outdated
Comment thread src/PhpPresentation/Shape/AutoShape.php Outdated
Comment thread tests/PhpPresentation/Tests/Shape/AutoShapeTest.php Outdated
@seanlynchwv seanlynchwv reopened this Nov 17, 2025
@seanlynchwv

seanlynchwv commented Nov 17, 2025

Copy link
Copy Markdown
Contributor Author

Hey @Progi1984

CI passes on PHP 7.1 and 7.4+ but fails on 7.2–7.3 because, as far as I can tell, the allowed phpoffice/phpspreadsheet versions (^1.9–^5.0) no longer include any release compatible with PHP 7.2/7.3.

For the next major release 1.3.0, could we set php 7.4 as the new minimum? PHP 7.4 reached EOL on November 28, 2022.

@seanlynchwv seanlynchwv mentioned this pull request Jan 5, 2026

@Progi1984 Progi1984 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small feedback

Comment thread src/PhpPresentation/Shape/AutoShape.php Outdated
Co-authored-by: Progi1984 <progi1984@gmail.com>
Comment thread tests/PhpPresentation/Tests/Shape/AutoShapeTest.php Outdated
Relocates testWriterEmitsAdjGuideForRoundRect from AutoShapeTest to
PptSlidesTest per maintainer feedback on PR PHPOffice#880, using the shared
zip/XML assertion helpers instead of manual ZipArchive/regex parsing.
@seanlynchwv
seanlynchwv requested a review from Progi1984 August 13, 2026 12:39
Comment thread tests/PhpPresentation/Tests/Writer/PowerPoint2007/PptSlidesTest.php Outdated
@Progi1984 Progi1984 linked an issue Aug 13, 2026 that may be closed by this pull request
@Progi1984
Progi1984 merged commit f4950f0 into PHPOffice:master Aug 13, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

setRadius() for AutoShape

3 participants