- 
                Notifications
    You must be signed in to change notification settings 
- Fork 535
Set Rounded Corners on Rectangle #880
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
base: master
Are you sure you want to change the base?
Set Rounded Corners on Rectangle #880
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some feedbacks
| - `phpoffice/phpspreadsheet`: Allow version 4.0 by [@nreynis](https://github.com/nreynis) in [#861](https://github.com/PHPOffice/PHPPresentation/pull/861) | ||
| - Smaller package size by [@nreynis](https://github.com/nreynis) in [#862](https://github.com/PHPOffice/PHPPresentation/pull/862) | ||
| - Added setFirstSliceAngle to Doughnut Chart by [@seanlynchwv](http://github.com/seanlynchwv) in [#872](https://github.com/PHPOffice/PHPPresentation/pull/872) | ||
| - Added ability to set rounded corner radius by [@seanlynchwv](http://github.com/seanlynchwv) in [#880](https://github.com/PHPOffice/PHPPresentation/pull/880) | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@seanlynchwv Could you move your change to 1.3.0.md, please ?
| { | ||
| $minHalf = (int) floor(min($this->width, $this->height) / 2); | ||
| if ($minHalf > 0) { | ||
| $this->roundRectAdj = max(0, min(50000, (int) round($pixels / $minHalf * 50000))); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where does come from 50000 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You must move this calcul on the writer side, not on the autoshape class.
| self::assertEquals(AutoShape::TYPE_HEXAGON, $object->getType()); | ||
| } | ||
|  | ||
| public function testPixelSetterComputesAdjAndAffectsHash(): void | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Progi1984 <progi1984@gmail.com>
Description
It's now possible to set the radius to create rounded corners on rectangle shapes.
Previously the corners were hard coded to a large value making custom designs difficult.
Fixes # (issue)
#854
Checklist: