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
 Issue - line object with arrows

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
graphman Posted - Apr 04 2014 : 04:46:26
I add a line object with arrows

After saving and opening I see line without arrows.

Why? How to fix it?

ps
I use
ImageEnIO1->Params->ImagingAnnot->CopyFromTImageEnVect(ImageEnView1);
and
ImageEnIO1->Params->ImagingAnnot->CopyToTImageEnVect(ImageEnView1);
11   L A T E S T    R E P L I E S    (Newest First)
graphman Posted - Apr 06 2014 : 16:57:26
TImageEnVect.SaveObjectsToTIFF

This method is not compatible with Wang Imaging.

I need annotations compatible with Wang Imaging.
graphman Posted - Apr 06 2014 : 16:51:14
I use
ImageEnVect1.IO.SaveToFile('output.tif');
and
ImageEnVect1.IO.LoadFromFile('output.tif');

I see my lines but without arrows.
w2m Posted - Apr 06 2014 : 16:21:00
Try saving the file to a tif. I am not sure if SaveToFile saves the objects, but I know tif files support objects. You could also call SaveToFileAll (*.all) which saves all layers and objects and load the LoadFromFileAll (*.all). You could also use others others like SaveToFilePNG then SaveToFileIEV with same filename
SaveToFilePNG(Mypng.png);
SaveToFile(Mypng.iev')
then reload with LoadFromFile and LoadFromFileIEV;

If you use or SaveToFileTIF with SaveObjectsToTIFF and LoadFromFileTif with LoadObjectsFromTIFF that should work as well.
// saves the background image
ImageEnVect1.IO.SaveToFile('output.tif');
// saves the objects
ImageEnVect1.SaveObjectsToTIFF('output.tif',0);

// loads the background image
ImageEnVect1.IO.LoadFromFile('output.tif');
// loads the objects
ImageEnVect1.LoadObjectsFromTIFF('output.tif',0);

If this does not work then I have no further help.

William Miller
graphman Posted - Apr 06 2014 : 05:56:09
I save into TIFF file (SaveToFile), not SaveToFileIEV
w2m Posted - Apr 05 2014 : 19:04:29
Well without seeing all your actual code I can not help much. The code works just fine here, so you are doing something wrong.

I can move an object from one TImageEnvect to another TImageEnVect and save and open the objects with the arrows visible on the line, so it is not an ImageEn problem.

procedure TForm1.CopyTo1Click(Sender: TObject);
{ Copy all objects in ImageEnVect1 to ImageEnVect2 }
begin
  ImageEnVect1.CopyAllObjectsTo(ImageEnVect2);
  ImageEnVect2.Update;
end;

procedure TForm1.Save1Click(Sender: TObject);
{ Save the objects to an iev file }
begin
  if SaveDialog1.Execute then
    ImageEnVect2.SaveToFileIEV(SaveDialog1.FileName);
end;

procedure TForm1.Clear1Click(Sender: TObject);
{ Clear ImageEnVect 2 }
begin
   ImageEnVect2.Clear;
   ImageEnVect2.RemoveAllObjects;
end;

procedure TForm1.Open2Click(Sender: TObject);
{ Open iev file with ImageEnVect2 }
begin
 OpenDialog1.Filter := 'ImageEn Objects|*.IEV';
  OpenDialog1.DefaultExt := 'IEV';
  if OpenDialog1.Execute then
    ImageEnVect2.LoadFromFileIEV(OpenDialog1.FileName);
end;

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Custom ImageEn Development
graphman Posted - Apr 05 2014 : 18:27:59
How can it help in my case?
I can save and open line objects without problems.
But after opening I don't see arrows.
w2m Posted - Apr 05 2014 : 18:13:18
Did you try the code I suggested?

William Miller
graphman Posted - Apr 05 2014 : 16:18:31
My "ImageEnView1" is TImageEnVect component.
graphman Posted - Apr 05 2014 : 16:15:00
> If you are saving the ImageEnView then you will loose all objects because
> TImageEnView does not support vectorial objects.

Of course I use ImageEnVect

> You should show your code that saves the file as well.

ImageEnIO1->SaveToFile(...)
w2m Posted - Apr 05 2014 : 15:47:50
If you are trying to copy objects from one ImageEnVect to another ImageEnVect then here is what you should do with pascal:
procedure TForm1.CopyTo1Click(Sender: TObject);
begin
  ImageEnVect1.CopyAllObjectsTo(ImageEnVect2);
  ImageEnVect2.Update;
end;

I do not develop with C but I believe the C code would be:

ImageEnVect1->CopyAllObjectsTo(ImageEnVect2);
ImageEnVect2->Update;


If you are saving the ImageEnView then you will loose all objects because TImageEnView does not support vectorial objects. You should show your code that saves the file as well.

William Miller
Adirondack Software & Graphics
Email: w2m@frontiernet.net
EBook: http://www.imageen.com/ebook/
Apprehend: http://www.frontiernet.net/~w2m/index.html
Custom ImageEn Development
graphman Posted - Apr 05 2014 : 14:20:40
To create arrows I use ObjBeginShape and ObjEndShape