Simplify the `create` method of `Size::class`
Author: olivervogelCreated Aug 22, 2026Updated Aug 22, 2026
Labelsmajor-release
The size method exists as a static factory method for Size::class.
Since it is essentially just a simplification of the constructor, it should fully embody that role.
Therefore, it should be possible to pass the pivot point directly using x and y without having to create a new object. Alternatively, pivot objects can still be passed via the constructor.
Before
Size::create(300, 200, new Point(30, 40));After
Size::create(300, 200, 30, 40);Source: Intervention/image