i m using Interactive ink for recognize the text and math content using bezierPath in my iOS application, i am getting that path from bamboo slate.when i draw path in my own view then it will right perfectly ,but i try to draw that path in canvas view provided in demo then it will automatically join start point and end point so my detection was not working properly.
i please check my below code also how i will draw path
if let Bazzrect = Bazz[i] as? UIBezierPath {
let n: Int = Bazzrect.cgPath.getPathElementsPoints().count
let events = UnsafeMutablePointer<IINKPointerEvent>.allocate(capacity: n)
let p = events
let pointerType = IINKPointerType.pen
for i in 0..<Bazzrect.cgPath.getPathElementsPoints().count
{
let point = Bazzrect.cgPath.getPathElementsPoints()[i]
try! editorViewController.editor.pointerEvents(p, count: n, doProcessGestures: false)
}
And my i m getting this image as output
Best Answer
O
Olivier @MyScript
said
over 2 years ago
Dear Raju,
thank you for contacting us.
Based on the screenshot, it seems the pointer UP is made on the same point than the pointer DOWN. Can you please set a breakpoint in your code and check the values that are passed to both the pointer DOWN and o the pointer UP?
Otherwise, you can also check directly the values of your array.
Based on the screenshot, it seems the pointer UP is made on the same point than the pointer DOWN. Can you please set a breakpoint in your code and check the values that are passed to both the pointer DOWN and o the pointer UP?
Otherwise, you can also check directly the values of your array.
Raju desai
Hello ,
i m using Interactive ink for recognize the text and math content using bezierPath in my iOS application, i am getting that path from bamboo slate.when i draw path in my
own view then it will right perfectly ,but i try to draw that path in canvas view provided in demo then it will automatically join start point and end point so my detection was not working properly.
i please check my below code also how i will draw path
if let Bazzrect = Bazz[i] as? UIBezierPath {
let n: Int = Bazzrect.cgPath.getPathElementsPoints().count
let events = UnsafeMutablePointer<IINKPointerEvent>.allocate(capacity: n)
let p = events
let pointerType = IINKPointerType.pen
for i in 0..<Bazzrect.cgPath.getPathElementsPoints().count
{
let point = Bazzrect.cgPath.getPathElementsPoints()[i]
if i == 0 {
p[i] = IINKPointerEventMakeDown(CGPoint(x: point.x, y:point.y), -1, 0, pointerType, 0);
}
else if i == (Bazzrect.cgPath.getPathElementsPoints().count - 1) {
p[i] = IINKPointerEventMakeUp(CGPoint(x: point.x, y:point.y), -1, 0, pointerType, 0);
}else{
p[i] = IINKPointerEventMakeMove(CGPoint(x: point.x, y:point.y), -1, 0, pointerType, 0);
}
}
try! editorViewController.editor.pointerEvents(p, count: n, doProcessGestures: false)
}
And my i m getting this image as output
Dear Raju,
thank you for contacting us.
Based on the screenshot, it seems the pointer UP is made on the same point than the pointer DOWN. Can you please set a breakpoint in your code and check the values that are passed to both the pointer DOWN and o the pointer UP?
Otherwise, you can also check directly the values of your array.
Best regards,
Olivier
- Oldest First
- Popular
- Newest First
Sorted by Oldest FirstRaju desai
Hi support team
Please contact me on my mail id
Olivier @MyScript
Dear Raju,
thank you for contacting us.
Based on the screenshot, it seems the pointer UP is made on the same point than the pointer DOWN. Can you please set a breakpoint in your code and check the values that are passed to both the pointer DOWN and o the pointer UP?
Otherwise, you can also check directly the values of your array.
Best regards,
Olivier