- Posts: 34
- Thank you received: 0
Microsoft Windows Phone 8.1 support ends (13 Jul 2017)
Microsoft has ended support for Windows Phone 8.1
Questions about Android development and PDF
Problems updating existing annotations
- sparklellama
- Topic Author
- Offline
- Junior Member
-
Less
More
IP: 192.168.0.70
12 years 2 months ago #4958
by sparklellama
Problems updating existing annotations was created by sparklellama
If you have a Page.Annotation object (here called mAnnotation) and you increase the stroke width as follows...
And then refresh the view like this…..
The annotation updated with a new stroke with, but there are two problems.
The bounding box of the annotation is not expanded, so the new (larger) stroke width is displayed clipped at the edges.
The reference to the annotation in mAnnotation becomes invalid, as the Annotation itself appears to move to a new location in memory. You cannot perform subsequent operations on the annotation or reliably get a reference to the new version of it.
Are these bugs in the library, or do you think I might have missed something?
Thanks
Code:
mAnnotation.SetStrokeWidth(largerStrokeWidth);
And then refresh the view like this…..
Code:
mPdfView.vRender(somePDFVPage);
The annotation updated with a new stroke with, but there are two problems.
Are these bugs in the library, or do you think I might have missed something?
Thanks
IP: 192.168.0.70
12 years 2 months ago #4960
by radaee
Replied by radaee on topic Problems updating existing annotations
you can modify bounding by:
Annotation.GetRect
//then modify rect coordinate
Annotation.SetRect
annotation object are not valid after vRender invoked.
you can record index of Annotation by a loop in Annotation object.
Annotation.GetRect
//then modify rect coordinate
Annotation.SetRect
annotation object are not valid after vRender invoked.
you can record index of Annotation by a loop in Annotation object.
IP: 192.168.0.70
12 years 2 months ago - 12 years 2 months ago #4961
by radaee
Replied by radaee on topic Problems updating existing annotations
i'll modify some codes, for convenience.
plz wait next version.
in next version, you can invoke:
and bounding box is auto increasing when you Invoke Annotation.SetStrokeWidth().
plz wait next version.
in next version, you can invoke:
Code:
Annotation.GetIndexInPage()
and bounding box is auto increasing when you Invoke Annotation.SetStrokeWidth().
Last edit: 12 years 2 months ago by .
IP: 192.168.0.158
12 years 2 months ago #4967
by nermeen
Replied by nermeen on topic Problems updating existing annotations
A new version
2.9.7beta7
has been pubblished..
it has the following modifications:
- NEW interface Annotation.GetIndexInPage()
- bounding box auto increasing, when user invoke Annotation.SetStrokeWidth()
it has the following modifications:
- NEW interface Annotation.GetIndexInPage()
- bounding box auto increasing, when user invoke Annotation.SetStrokeWidth()
- sparklellama
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 34
- Thank you received: 0
IP: 192.168.0.70
12 years 2 months ago - 12 years 2 months ago #4982
by sparklellama
Replied by sparklellama on topic Problems updating existing annotations
GetIndexInPage() verified as working. Thank you.
Still working on second item.
Still working on second item.
Last edit: 12 years 2 months ago by [email protected].
- sparklellama
- Topic Author
- Offline
- Junior Member
-
Less
More
- Posts: 34
- Thank you received: 0
IP: 192.168.0.70
12 years 2 months ago #4985
by sparklellama
Replied by sparklellama on topic Problems updating existing annotations
Thanks for the update to the bounding box. It works but there is a problem. If the annotation has been moved, the bounding box returns to its original position, and the annotation becomes clipped. I have created an image with some screen shots to help show the problem. Do you think that the library can be updated to correct this issue?
Thank you very much. Image can be found at the following URL.
www.asdeqlabs.com/wp-content/uploads/2014/01/pdfissue.png
Thank you very much. Image can be found at the following URL.
www.asdeqlabs.com/wp-content/uploads/2014/01/pdfissue.png
Time to create page: 0.439 seconds