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
 Problem with ImageEnView grid display and layers
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

phaiduc

Romania
3 Posts

Posted - Jan 30 2012 :  03:15:57  Show Profile  Reply
Hello

I am experiencing the following problem using ImageEn V4.0.2:
- grid displaying is enabled in the ImageEnView component located on a form
- the grid is correctly displayed on the main Layer 0
- I create a new Layer 1
- after that the grid is no more displayed on the main Layer 0, but only on the newly created Layer 1.

This can be easily reproduced by the code below:

unit Unit1;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ieview, imageenview, imageen;

type
TForm1 = class(TForm)
ImageEn1: TImageEn;
Button1: TButton; // Button to be pressed to create a new layer
procedure Init(Sender: TObject); // called by Form1.OnShow event
procedure AddLayerClick(Sender: TObject); // called by Button1.OnClick event
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.dfm}

// called by Form1.OnShow event in order to initialize ImageEn1
procedure TForm1.Init(Sender: TObject);
begin
with ImageEn1 do
begin
Zoom:=400; // set zoom factor=400% in order to allow displaying the grid
DisplayGrid:=true; // display the grid on main Layer[0]
end;
end;

// called by the Button1.OnClick event
// Button1 is pressed on Form1 and a new layer is created
// the grid is NO more displayed on main Layer[0] of ImageEn1,
// but only on the newly created Layer[1]
procedure TForm1.AddLayerClick(Sender: TObject);
begin
with ImageEn1 do
begin
// select an area
Select(20,20,120,120);
// create a new layer from the selection
LayersCreateFromSelection;
end;
Button1.Enabled:=false; // don't allow new layers to be created
end;

end.

I need the grid to remain displayed on the main Layer 0,
as it would be normal.
Thank you in advance for a solution.

fab

1310 Posts

Posted - Jan 30 2012 :  04:00:33  Show Profile  Reply
Hello,
current release shows the grid on current layer (or on the entire layer 0 when layer 0 is selected).
Since next minor release this behavior can be changed allowing following possibilities:
- display the grid on current layer (current and default behavior)
- display the grid on a specific layer (or 0 if you want to cover the entire layer 0 area)

The new property will be:

ImageEnView1.DisplayGridLyr := 0; // draw grid on layer 0
Go to Top of Page

phaiduc

Romania
3 Posts

Posted - Jan 30 2012 :  04:04:05  Show Profile  Reply
Can you please tell me when the next minor release will be available?
I need to deliver the application to the customer ASAP.
Go to Top of Page

fab

1310 Posts

Posted - Jan 30 2012 :  04:52:13  Show Profile  Reply
I hope it is ready for this week.
Go to Top of Page

phaiduc

Romania
3 Posts

Posted - Jan 30 2012 :  05:53:45  Show Profile  Reply
Great. Thank you very much.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: