Function that requires many parameters
- by user877329
I have a problem related to this:
Are there guidelines on how many parameters a function should accept?
In my case, I have a function that describes a rounded rectangle. The caller specifies
An integer which determines how the rectangle should be merged into previously created shapes
An Anchor, which is a point that is used for alignment (right, left, top, bottom etc). (0,-1) means that position (next parameter) describes the top, middle point of the rectangle.
The position of the rectangle
Width and height
Corner radius
Should I use Parameter Object pattern in this case? It is hard to see how these parameters are related