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
 ImageEnView.LayersSync removal

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
klausdoege Posted - May 24 2017 : 09:48:03
Hello,
After the removal of ImageEnView.LayersSync in version 7.0.
Another layer is no longer on Posxy (0,0).
You have to correct it yourself.
Is there a better solution?

Klaus
www.klausdoege.de
9   L A T E S T    R E P L I E S    (Newest First)
klausdoege Posted - Jun 01 2017 : 07:08:55
Hi Nigel,
thank you, now it works fine.

Klaus
www.klausdoege.de
xequte Posted - May 29 2017 : 21:45:32
Hi Klaus

Yes, there seems to be an issue if the base layer is moved off 0,0. Please email me for a source update.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
w2m Posted - May 29 2017 : 15:39:55
Sorry Klaus,

Creation of a layer from a selection works perfectly here. I do not see any problems and I am failing to understand what your exact problem is.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
klausdoege Posted - May 29 2017 : 15:37:14
Hello Bill,
sorry my mistake.
I mine imageenvect.LayersCreateFromSelection;
I use mageEn 7.0.
With ImageEn 6.3.3 i not have this problem.
I have tested with your example, the same result.
Please check it again.
Klaus


Klaus
www.klausdoege.de
w2m Posted - May 29 2017 : 13:20:34
ImageEn 7.0 does not have AddLayerFromSelection. It does have ImageEnView1.LayersCreateFromSelection, but the selection should be removed after creating the layer. If you are using a older version of ImageEn that has AddLayerFromSelection I am not sure of the differences between them.

procedure TForm1.CreateLayersFromSelection1Click(Sender: TObject);
var
  iLayer: Integer;
begin
  Screen.Cursor := crHourglass;
  try
    { Copy selected area and create a new layer }
    iLayer := ImageEnView1.LayersCreateFromSelection;
    ImageEnView1.Layers[iLayer].Name := 'Image Layer';
    { Move the new layer }
    ImageEnView1.CurrentLayer.PosX := ImageEnView1.CurrentLayer.PosX + 200;
    ImageEnView1.CurrentLayer.PosY := ImageEnView1.CurrentLayer.PosY + 200;
    ImageEnView1.Update;
    ImageEnView1.Deselect;
    ImageEnView1.MouseInteract := [miMoveLayers, miResizeLayers];
    ImageEnView1.IEBitmap.Modified := True;
    ImageEnView1.SetFocus;
    DrawLayers;
    UpdateGUI;
    UpdateLayers;
    UpdateStatusBar;
  finally
    Screen.Cursor := crDefault;
  end;
end;

I am not sure if this helps, but be aware you have to convert to layer coordinates when using layers and selections:

function ConvXScr2Bmp(x: Integer): Integer;

Description
Converts screen coordinates to bitmap coordinates, with consideration to the layer position and size.

See Also
TImageEnView.XScr2Bmp
TIELayer.ConvYScr2Bmp
TIELayer.ConvXBmp2Scr
TIELayer.ConvYBmp2Scr

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
klausdoege Posted - May 29 2017 : 12:42:13
Hello Nigel,
yes, i can do that.
But then next problem , i have by imageenview.addlayerfromselection.
See Example:
Desktop1 = Original with selection (autofit=true)
Desktop2 = Addlayer fromselection it's OK
Desktop3 = Selection in Original (autofit=false)
Desktop4 = addlayerfromselection wrong area, layer is not the selection ?
Regards
Klaus










Klaus
www.klausdoege.de
xequte Posted - May 28 2017 : 15:13:17
Hi Klaus

Yes, we now advance the position. Please set the PosX and PosY when creating the layer.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
klausdoege Posted - May 27 2017 : 17:36:25
Hello Nigel,
yes in my old version layersync=true.
Now i have tested with your example, see picture.
Desktop1 it's the original picture.
Desktop2 add layer works correct, then autofit=true,
Desktop3 if autofit not true and the picture not fill the area complete.
Then the new layer not on posxy(0,0).
The same is happens by addlayerfromselection-
Regards
Klaus







Klaus
www.klausdoege.de
xequte Posted - May 24 2017 : 20:05:17
Hi Klaus

Sorry, to clarify, you were using LayersSync = True, in the older version?

The default position for new layers should be 0,0. What steps are you taking and what are you trying to achieve?

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com