RadaeePDF.com :: Topic: Ink Annotation (1/3)
Welcome, Guest
Username: Password: Remember me

Signin/Signup with:

Questions about Android development and PDF

TOPIC: Ink Annotation

Ink Annotation 4 years 5 months ago #1334

  • msj
  • msj's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Can I get points of Ink Annotation?
The administrator has disabled public write access.

Ink Annotation 4 years 5 months ago #1335

  • radaee
  • radaee's Avatar
  • OFFLINE
  • Moderator
  • Posts: 825
  • Thank you received: 10
  • Karma: 43
yes, you can invoke:
Ink.GetNodeCount();
Ink.GetNode( int index, float[] pt );
draw on canvas like:
	public void OnDraw(Canvas canvas)
	{
		int index = 0;
		int cnt = getNodeCount(hand);
		float pt1[] = new float[2];
		float pt2[] = new float[2];
		Paint paint = new Paint();
		Path path = new Path();
		paint.setStrokeCap(Cap.ROUND);
		paint.setStrokeJoin(Join.ROUND);
		paint.setStrokeWidth(width);
		paint.setColor(color);
		paint.setStyle(Style.STROKE);
		paint.setAntiAlias(true);
		path.reset();
		while( index < cnt )
		{
			int op = getNode( hand, index, pt1 );
			switch( op )
			{
			case 1:
				path.lineTo(pt1[0], pt1[1]);
				index++;
				break;
			case 2:
				getNode( hand, index + 1, pt2 );
				path.quadTo(pt1[0], pt1[1], pt2[0], pt2[1]);
				index += 2;
				break;
			default:
				path.moveTo(pt1[0], pt1[1]);
				index++;
				break;
			}
		}
		canvas.drawPath(path, paint);
	}
Last Edit: 4 years 5 months ago by .
The administrator has disabled public write access.

Ink Annotation 4 years 5 months ago #1346

  • msj
  • msj's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Thanks for your answer.

Then I want to get saved Ink Annotations in document. But I could not find the method.

Help me, please!
The administrator has disabled public write access.

Ink Annotation 4 years 5 months ago #1349

  • radaee
  • radaee's Avatar
  • OFFLINE
  • Moderator
  • Posts: 825
  • Thank you received: 10
  • Karma: 43
oh, you can't get Ink object from saved PDF.
you can just get Annotation and check annotation type by:
- Page.GetAnnot
- Page.GetAnnotType()
The administrator has disabled public write access.

Ink Annotation 4 years 5 months ago #1352

  • msj
  • msj's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Karma: 0
Would you make it possible to get ink object from saved document?
The administrator has disabled public write access.

Ink Annotation 4 years 5 months ago #1354

  • radaee
  • radaee's Avatar
  • OFFLINE
  • Moderator
  • Posts: 825
  • Thank you received: 10
  • Karma: 43
NO, i think not.
i think you may save some data out of PDF, which using to contruct Ink object.
Last Edit: 4 years 5 months ago by .
The administrator has disabled public write access.
Powered by Kunena Forum