What is $actwoa and $acthoa for?

Asked by Miles Gillham

They are used but never actually defined or initialized?

Question information

Language:
English Edit question
Status:
Solved
For:
buttonmill Edit question
Assignee:
No assignee Edit question
Solved by:
Eric Dennison
Solved:
Last query:
Last reply:
Revision history for this message
Best Eric Dennison (ericd-netdenizen) said :
#1

$actwoa and $acthoa refer to "actual width overall" and "actual height overall". These values are actually set during the call to MakeFilledButtonPolygon, where they are known as $actwidth and $actheight. The reason for these is that when a user sets a height and width for the button, but the selected corner radius would require the button to be larger (radius overrides height or width spec), then MakeFilledButtonPolygon generates new, "actual" width and height values that will be used to generate the final image.

For example, if you specify button width and height of 10 pixels, but a radius of 100 pixels, you will end up with a button that is 200x200 pixels, to accommodate the specified radius. $actwoa and $acthoa should carry the 200x200 pixel information throughout the rendering process.

What is confusing about this is the change of parameter name as the code drills down through various function calls. Because these parameters are by reference, rather than value, they are used to return information from the function, which is why it looks like they are never set.

Revision history for this message
Miles Gillham (milesgillham) said :
#2

Thank you for the very comprehensive reply, that makes perfect sense!

Regards, Miles