Welcome Guest! To enable all features, please Login or Register.

Notification

Icon
Error

Options
View
Last Go to last post Unread Go to first unread post
#1 Posted : Tuesday, June 28, 2005 8:33:28 AM(UTC)

Paul  
Paul

Groups: Registered
Posts: 1


I am running the LeadTools ANNOTATE demo.  What I am trying to
accomplish is to move the annotation to a visible portion of a small
bitmap.   In short, if the annotation originally came from a
larger bitmap *and* if the results of a "Copy/Paste" operation would
place the annotation  outside the viewable area of the smaller
bitmap, I am attempting to move the annotation to a visible area of the small bitmap.


So far, I have intercepted the LTANNEVENT_INSERT event..  My
current routine is when I get the LTANNEVENT_INSERT    ,
I get the rect of the annotation I want to move (L_AnnGetRect), change
the left, top, right, bottom, of the rect and then call L_AnnSetRect to reposition the annotation on the smaller bitmap. 

All works well except for the following annotations:

Line  (If the left point is "lower" than the right, the line becomes a mirror image).
PolyLine
Polygon
Pointer
FreeHand
Ruler (ruler is always placed in the same location, regardless of the rect settings)


The only annotations where getting and resetting the rect will work for
are the Stamp, Hilite, Rectangle, Redact, Text, Note, i.e. annotations that represent "closed" figures (except for the Polygon). 

I have several questions:


1) Is L_AnnGetRect and L_AnnSetRect the proper functions to get the
rectangle and move the annotation to another area, especially another area during a copy and paste function? 

2) Should this function occur *after* the paste has completed?


3) Is this a known issue with some annotations (mostly the non-closed
figures) not being able to be moved during a copy and paste between two bitmaps/windows?

I tried this with LeadTools 11 as well as LeadTools 14.  The problem is easily duplicable:

Start the ANNOTATE demo
Load two bitmaps (where one bitmap is larger in size than the other)

Create an annotation in the larger bitmap that would be outside of the displayable area in the smaller bitmap if it were pasted there.
Now copy this annotation and paste it into the smaller bitmap.


You will see that the annotation will not be seen in the smaller
bitmap.  My e-mail describes what I have done to rectify the problem, and the issues encountered.

Thanks in advance.
 

Try the latest version of LEADTOOLS for free for 60 days by downloading the evaluation: https://www.leadtools.com/downloads

Wanna join the discussion? Login to your LEADTOOLS Support accountor Register a new forum account.

#2 Posted : Thursday, June 30, 2005 6:43:44 AM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 367

Was thanked: 1 time(s) in 1 post(s)

Like you found out, the L_AnnGetRect and L_AnnSetRect functions only
work with objects that have exactly 4 points, such as RECT, HILITE and STAMP.


For the following objects, you need to use L_AnnGetPoints, modify each point in the array individually and then call L_AnnSetPoints:
ANNOBJECT_POINTER
ANNOBJECT_FREEHAND
ANNOBJECT_LINE
ANNOBJECT_POLYGON
ANNOBJECT_POLYLINE
ANNOBJECT_POINT
ANNOBJECT_CROSSPRODUCT
ANNOBJECT_PROTRACTOR
ANNOBJECT_FREEHANDHOTSPOT
ANNOBJECT_TEXTPOINTER

The help topic for L_AnnGetPoints contains an example showing how to do this.

Amin Dodin

LEADTOOLS Technical Support
Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

Powered by YAF.NET | YAF.NET © 2003-2024, Yet Another Forum.NET
This page was generated in 0.071 seconds.