I'm able to draw the bounding box in the correct location after applying the viewTransform, but for items off the screen at the time of search, there's nothing I can do except to search again after panning the screen.
Is there a way I can draw the bounding boxes in the MyScript layers which already respond to the pan gestures?
currently, which function are you using?
Indeed, if using the drawRectangle function we provide in the Canvas class of the uireferenceimplementation, you can see this latter one calls "canvas.drawRect".
Based on this, you understand it is not possible to write outside of the screen.
Maybe you could try implementing your own drawRectangle expanding the clipRect of the canvas?
Let us know if this works.
I'm drawing the rectangles onto a seperate uiview which I temporarily add as a subview to the editorViewController.view If I shift the temporary view's origin in code, I can see that all the items are highlighted. Which I believe is what you were trying to refer to by drawing things outside of the clipRect.
The only problem is that when I scroll the editorViewController, the note content moves but the subview does not.
I've tried adding a pan gesture recognizer on top, but that interferes with the one in editorViewController.mm and since I cannot modify editorViewController.mm to call a scroll function back in Main View Controller, I'm not sure what to do.
thank you for the update and precision.
We discussed internally of your use-case, and we have though you could proceed as follows:
-you could implement a listener on the view transform of the editorViewController.view
-when a change occurs in your view, you can then update your subview accordingly
-This way, you do not have to re-implement the the gesture recognizers on top of those already provided by thie UI Ref Implementation
Let us know if this helps.