Align Canvas method parameters better with JavaScript#4330
Align Canvas method parameters better with JavaScript#4330HalfWhitt wants to merge 3 commits intobeeware:mainfrom
Conversation
|
I'm not sure if this change note should be misc or removal. It's not technically changing anything that was already there, but it is changing the thing that's replacing it. |
|
I think the intent is good. There may need to be some backwards compatibility about the attributes on However I need to catch up on the changes made in #4159 so this may have already been addressed/made moot. |
Hm, that's a good point. The docs say not to ever directly create drawing actions, but they do describe editing their attributes, and that particular one by name. In any event, I do need to update the docs. |
Part of #3994
This alters the parameters of Canvas's (new)
fillandstrokemethods to better match the HTML/JavaScript version. Only parameters valid in JavaScript can be provided as positional arguments; any of the extra parameters Toga accepts must be by keyword. It also renamescolortofill_style/stroke_stylein their respective methods. (I could also see an argument for naming them simplystyle.)Because Canvas is only now gaining these methods, we don't need any new shims; the existing shims on the capitalized versions (and the methods on context managers) can do the necessary translation.
So far, I've fixed existing tests, but not yet written new ones (or done any particularly thorough double-checking yet). Wanted to go ahead and put this out there before I head to bed, in case there are questions or feedback on the general intent.
PR Checklist: