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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Save current Annotation
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

lzehnder

France
14 Posts

Posted - Dec 28 2012 :  02:27:35  Show Profile  Reply
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

w2m

USA
1990 Posts

Posted - Dec 28 2012 :  08:08:33  Show Profile  Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: