cappuccino / cappuccino

Web Application Framework in JavaScript and Objective-J
https://cappuccino.dev/
GNU Lesser General Public License v2.1
2.21k stars 333 forks source link

CPView is missing rotateByAngle method #2982

Open enquora opened 3 years ago

enquora commented 3 years ago

RotationTests.zip Do we have an entirely distinct (from Objective-C) of accomplishing arbitrary rotation of a view or am I correct assuming it isn't currently possible without directly manipulating the underlying DOM?

The problem is deeper, as demonstrated by the attached reductions in each of Objective-C and Objective-J — which highlight a discrepancy in behaviour.

In Objective-C, setting a views' wantsLayer: automatically creates a layer, which one can directly apply an affine transformation to.

In Objective-J, it appears necessary to manually create the layer, then implement (void)drawInContext:(CGContextRef)ctx. This suggests incomplete implementation of layer functionality compared to the reference implementation.

cappbot commented 3 years ago

Milestone: Someday. Label: #new. What's next? A reviewer should examine this issue.

daboe01 commented 3 years ago

I do not see a universal and clean way to implement a tranformation matrix that works transparently with every view. This is because CPView can use different means of drawing, either canvas or DOM directly. IMHO our abstraction is not deep enough to make rotateByAngle: work within CPView.

daboe01 commented 2 years ago

-#new +#needs-discussion

cappbot commented 2 years ago

Milestone: Someday. What's next? A reviewer should examine this issue.