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 : Monday, July 31, 2006 4:34:24 AM(UTC)

marasma  
marasma

Groups: Registered
Posts: 51


Hi,

I need to clone some AnnStampObject and put them into a new RasterImageViewer in the exact relative position they were in the original viewer. The destination viewer is newer and empty, I 've to copy only the images of the original  annotations to create a new image made by the images of the AnnStampObject. How can I do this in VB Dot net with Document SDK ver. 14.5?

Thanks

 

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 : Wednesday, August 2, 2006 9:30:10 AM(UTC)

Amin  
Amin

Groups: Manager, Tech Support
Posts: 367

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

I'm not sure I understand what the destination viewer image will contain. It doesn't appear you want it to contain a copy of the source image, is this correct? Could you elaborate more about this point, and explain what you tried and why it didn't do what you needed?

Amin Dodin

Senior Support Engineer
LEAD Technologies, Inc.
LEAD Logo
 
#3 Posted : Friday, August 18, 2006 11:10:08 AM(UTC)

marasma  
marasma

Groups: Registered
Posts: 51


Hi,

I need to create a new image with a black background (this is not a problem for me) and the annotation selected in the original image, finalized on the new image (not like annotation added on the black background), but like a whole single bitmap.

Thanks.

 
#4 Posted : Wednesday, August 23, 2006 12:12:08 PM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


You can do this by getting the currently selected AnnObject in your first AnnAutomation.  Then create a new AnnObject by calling [CurrentlySelectedAnnObject].Clone().  After this you can add it to your second AnnAutomation.Container, call AnnAutomation.Realize(), and then finally clear the AnnObjects from the second container.  The following sample code is in VB.NET:

Dim obj As AnnObject
obj = annAuto1.CurrentEditObject.Clone
annAuto2.Container.Objects.Add(obj)
annAuto2.Realize()
annAuto2.Container.Objects.Clear()
RasterImageViewer2.Invalidate()
 
#5 Posted : Thursday, November 30, 2006 4:37:58 PM(UTC)

cmurphy  
cmurphy

Groups: Registered
Posts: 31


Could post C# Annotation COM sample code too please?
I'm using version 14.5 annotation COM with dotNet class.
 
#6 Posted : Monday, December 4, 2006 5:51:05 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


AnnObject obj;
obj = annAuto1.CurrentEditObject.Clone();
annAuto2.Container.Objects.Add(obj);
annAuto2.Realize();
annAuto2.Container.Objects.Clear();
RasterImageViewer2.Invalidate();
 
#7 Posted : Monday, December 4, 2006 2:01:03 PM(UTC)

cmurphy  
cmurphy

Groups: Registered
Posts: 31


I didn't use automation annotation. I'm using annotation COM version 14.5 with dotNet class. Do I supppose to create automation annotation and clone it?
 
#8 Posted : Thursday, December 7, 2006 5:23:30 AM(UTC)

GregR  
GregR

Groups: Registered, Tech Support, Administrators
Posts: 764


No, the automation classes referenced above are only in the .NET libraries.  For the COM objects you will need to have two LEADRasterAnnotation objects (RasterAnn and RasterAnn2 in the sample below).  As long as you  have created two LEADRasterView objects and have initialized RasterAnn and RasterAnn2 properly, this code will copy a selected annotation from the RasterAnn and paste it into RasterAnn2.

RasterAnn.AnnCopy(AnnFMTConstants.ANN_FMT_NATIVE, true, true);
RasterAnn2.AnnPaste();

For other options such as different transfer formats and which objects to copy, take a look at your COM object help file's documentation on the AnnCopy method.
 
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.074 seconds.