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
 unload IEV File from ImageEnVect1
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

peberhardt

Germany
21 Posts

Posted - May 22 2017 :  03:44:08  Show Profile  Reply
Hello,

i am using more as one iev files for the same ImageVect1

( not on the same time )


// look for vectorial objects
if FileExists(file_string + '.iev') then
begin
ImageEnVect1.LoadFromFileIEV(file_string + '.iev');
end
else
begin

// here i need a empty ImageVect1

// not working the 3 codes...
  ImageEnVect1.Clear;
  ImageEnVect1.ClearAll;
  ImageEnVect1.Blank;

end;


thank you for help

best regards
peter




xequte

38611 Posts

Posted - May 23 2017 :  22:51:58  Show Profile  Reply
Hi Peter

Please use:

ImageEnVect1.RemoveAllObjects();
ImageEnVect1.ClearAll();


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

peberhardt

Germany
21 Posts

Posted - May 24 2017 :  03:45:22  Show Profile  Reply
Hello Nigel,

here my way for more understanding

Button one ( load Picture A.jpg ) and wenn exist A.iev


ImageEnVect1.IO.LoadFromFile('A.jpg');

if FileExists('A.iev') then
begin
ImageEnVect1.LoadFromFileIEV('A.iev');
end;



Button two ( load Picture B.jpg ) and wenn exist B.iev


ImageEnVect1.IO.LoadFromFile('B.jpg');

if FileExists('B.iev') then
begin
ImageEnVect1.LoadFromFileIEV('B.iev');
end;


the proplem is wenn not exist B.iev then is the follow loaded

B.jpg and A.iev

a clear all objects is not a solution


best regards
peter
Go to Top of Page

xequte

38611 Posts

Posted - May 24 2017 :  06:15:03  Show Profile  Reply
Sorry I'm not following. Why not just use:

if FileExists('B.iev') then
begin
  ImageEnVect1.IO.LoadFromFile('B.jpg');
  ImageEnVect1.LoadFromFileIEV('B.iev');
end;


Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

peberhardt

Germany
21 Posts

Posted - May 24 2017 :  06:28:05  Show Profile  Reply
Hello,

because B.iev on first call from B.ipg not exist


best regards
peter
Go to Top of Page

xequte

38611 Posts

Posted - May 24 2017 :  20:07:22  Show Profile  Reply
Sorry Peter, I'm not seeing what you are trying to do.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page

peberhardt

Germany
21 Posts

Posted - May 26 2017 :  15:50:59  Show Profile  Reply
Hello,

i have a video as Attach

i load a Pic ( Jelly ) make a Vector and save the Vector as jelly.iev

now i load another Picture ( flower )
and i have loading flower.jpg AND jelly.iev


attach/peberhardt/2017526154517_iev problem.zip
523.51 KB

procedure TForm1.btn_load_jellyClick(Sender: TObject);
begin
  if FileExists(ExtractFilePath(Application.exename) + 'jelly.jpg') then
  begin
      // load the bitmap
    ImageEnVect1.IO.LoadFromFile(ExtractFilePath(Application.exename) + 'jelly.jpg');

      // look for vectorial objects
    if FileExists(ExtractFilePath(Application.exename) + 'jelly.iev') then
    begin
      ImageEnVect1.LoadFromFileIEV(ExtractFilePath(Application.exename) + 'jelly.iev');
    end;
  end;
end;

procedure TForm1.btn_load_flowerClick(Sender: TObject);
begin
   if FileExists(ExtractFilePath(Application.exename) + 'flower.jpg') then
  begin
      // load the bitmap
    ImageEnVect1.IO.LoadFromFile(ExtractFilePath(Application.exename) + 'flower.jpg');

      // look for vectorial objects
    if FileExists(ExtractFilePath(Application.exename) + 'flower.iev') then
    begin
      ImageEnVect1.LoadFromFileIEV(ExtractFilePath(Application.exename) + 'flower.iev');
    end;
  end;
end;

// save iev for Jelly
procedure TForm1.btn_iev_save_1Click(Sender: TObject);
begin
ImageEnVect1.SaveToFileIEV(ExtractFilePath(Application.exename) + 'jelly.iev');
end;

// save iev for flower
procedure TForm1.btn_iev_save_2Click(Sender: TObject);
begin
ImageEnVect1.SaveToFileIEV(ExtractFilePath(Application.exename) + 'flower.iev');
end;

// make vector
procedure TForm1.Button1Click(Sender: TObject);
begin
  ImageEnVect1.ObjFontHeight[-1] := 30;
  ImageEnVect1.ObjTransparency[-1] := 255;
  ImageEnVect1.ObjPenColor[-1] := clWhite;
ImageEnVect1.MouseInteractVt := ImageEnVect1.MouseInteractVt + [miPutText];
end;




Go to Top of Page

xequte

38611 Posts

Posted - May 28 2017 :  15:17:31  Show Profile  Reply
OK, so why not use

procedure TForm1.btn_load_jellyClick(Sender: TObject);
begin
  if FileExists(ExtractFilePath(Application.exename) + 'jelly.jpg') then
  begin
    ImageEnVect1.RemoveAllObjects();

      // load the bitmap
    ImageEnVect1.IO.LoadFromFile(ExtractFilePath(Application.exename) + 'jelly.jpg');

      // look for vectorial objects
    if FileExists(ExtractFilePath(Application.exename) + 'jelly.iev') then
    begin
      ImageEnVect1.LoadFromFileIEV(ExtractFilePath(Application.exename) + 'jelly.iev');
    end;
  end;
end;

procedure TForm1.btn_load_flowerClick(Sender: TObject);
begin
   if FileExists(ExtractFilePath(Application.exename) + 'flower.jpg') then
  begin
    ImageEnVect1.RemoveAllObjects();

      // load the bitmap
    ImageEnVect1.IO.LoadFromFile(ExtractFilePath(Application.exename) + 'flower.jpg');

      // look for vectorial objects
    if FileExists(ExtractFilePath(Application.exename) + 'flower.iev') then
    begin
      ImageEnVect1.LoadFromFileIEV(ExtractFilePath(Application.exename) + 'flower.iev');
    end;
  end;
end;





Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: