Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC:

Multiple annotation for line,rectangle,square etc... 4 years 5 months ago #14738

  • apdeveloper
  • apdeveloper's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 67
  • Thank you received: 0
Dear Team,
Suppose we are doing rectangle annotation and we have selected rectangle and after that we are making multiple rectangle and then we are clicking the done button or cancel button.
My query is whenever user makes one rectangle then they should either click on done or cancel .
They should not make another rectangle and same for other annotation as well.
Once the done button or cancel button is clicked now they should be able to make rectangle again or any other annotation.

Please Log in or Create an account to join the conversation.

Multiple annotation for line,rectangle,square etc... 4 years 5 months ago #14739

  • federico
  • federico's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 261
  • Thank you received: 18
Hi,
If you want to force user to click done or cancel on every annot rect drawn you should add this line at the beginning of OnRectTouchBegin, OnRectTouchMove and OnRectTouchEnd methods in PDFLayoutView class:
if( m_rects_cnt > 0 ) return false;

Please Log in or Create an account to join the conversation.

Last edit: by federico.

Multiple annotation for line,rectangle,square etc... 4 years 5 months ago #14742

  • apdeveloper
  • apdeveloper's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
  • Posts: 67
  • Thank you received: 0
Dear Team,
Problem for rectangle,Line and oval has been resolved but how to restrict ink annotation.Their is no counter set for ink annotation or you can say pen annotation.

Please Log in or Create an account to join the conversation.

Last edit: by apdeveloper.

Multiple annotation for line,rectangle,square etc... 4 years 5 months ago #14746

  • federico
  • federico's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 261
  • Thank you received: 18
Hi,
You could add and using it in the same way of others.
Add a count in PDFLayoutView.h:
int m_ink_cnt;
Then you should add this line at the beginning of OnInkTouchBegin, OnInkTouchMove and OnInkTouchEnd methods in PDFLayoutView class:
if (m_ink_cnt > 0) return false;
In the end you should add this line in vInkCancel and vInkEnd methods:
m_ink_cnt = 0;

Please Log in or Create an account to join the conversation.

Last edit: by federico.
  • Page:
  • 1
Powered by Kunena Forum