Skip to content

Conversation

MightyJosip
Copy link
Member

A lot of code used for different rect attributes is repeated. So this PR moves it to macro, and for each attribute only defines unique parts

@MightyJosip MightyJosip requested a review from a team as a code owner June 9, 2025 12:42
Copy link
Member

@zoldalma999 zoldalma999 left a comment

Choose a reason for hiding this comment

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

There's a conflict now, because relcenter was added. Also added a nitpicky comment/question.

Comment on lines +2455 to +2460
RECT_ATTRIBUTE(topright,
TupleFromTwoPrimitives(self->r.x + self->r.w, self->r.y),
PrimitiveType val1;
PrimitiveType val2, twoPrimitivesFromObj(value, &val1, &val2),
self->r.x = val1 - self->r.w;
self->r.y = val2;)
Copy link
Member

Choose a reason for hiding this comment

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

Not sure how much the formatter allows it, but it was not clear to me that val1 and val2 are in the same argument, or what each argument does. Maybe adding comments might help?

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

Successfully merging this pull request may close these issues.

2 participants