calling CFrame::setZoom() on iOS yields the correct scaling of my frame's content. However, the touch event handling always seems to respect the original coordinate system, i.e. controls still react to their original bounding boxes present before the setZoom() call.
I haven't analyzed the problem in depth, but everything works as expected on Mac OS and Windows targets, so I suspect the bug is located in CFrame::platformOnTouchEvent() or the calling code in uiviewframe.mm. And in fact, applying the inverse transform to the touch location in updateTouchEvent: in VSTGUI_UIView seems to fix the described issue:
Code: Select all
auto ctm = ((CFrame*) uiViewFrame->getFrame())->getTransform().inverse()
iTouch->second.location = CPointFromCGPoint ([touch locationInView:self]);
t.location = CPointFromCGPoint ([touch locationInView:self]);
But of course, this should be considered anything but a clean fix.
The goal is to scale an existing desktop implementation of my editor to fit a given iOS device's display using CFrame::setZoom(). Any hints on what would be an alternative or the goto approach?