ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Save current Annotation

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
lzehnder Posted - Dec 28 2012 : 02:27:35
Hello,

with the Demo AdvancedText, open a tiff file, add a text annotation and directly clic on save button.

The annotation is not saved.
Before clic on save, if you exit the text bloc is ok.

Have you a solution to save the annotation currently edited ?

Thank you
1   L A T E S T    R E P L I E S    (Newest First)
w2m Posted - Dec 28 2012 : 08:08:33
The reason why the object is not merged is because MouseInteractVt is in miPutMemo and is still editing. To get around this problem set MouseInteractVt to nil or call ImageEnVect1.CancelInteracts then CopyObjectsToBack.

procedure Tfmain.Saveas1Click(Sender: TObject);
var
  filename: string;
begin
  filename := ImageEnVect1.IO.ExecuteSaveDialog();
  if filename <> '' then
  begin
    // save the image without vectorial objects
    ImageEnVect1.Proc.SaveUndo;
    // exit editing mode by setting MouseInteractVt to nil or by calling CancelInteracts
    ImageEnVect1.MouseInteractVt := []; // or
    // ImageEnVect1.CancelInteracts;
    // merge vectorial objects with the background image
    ImageEnVect1.CopyObjectsToBack(true);
    // save to disk
    ImageEnVect1.IO.SaveToFile(filename);
    // set MouseInteractVt back to miPutMemo
    ImageEnVect1.MouseInteractVt := [miPutMemo];
    // restore
    ImageEnvect1.Proc.Undo;
  end;
end;


There may be other ways to do this, but you have to exit memo editing mode before merging the objects to the background.

William Miller
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html