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
 Line Layer Default Properties
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

grant1842

USA
1 Posts

Posted - Sep 24 2020 :  22:16:11  Show Profile  Reply
Hello all.
I am looking at the line layer.

I am trying to draw a default line with a fixed line width.

TIELineLayer( ImageEnView1.CurrentLayer ).LineColor := clGreen;
TIELineLayer( ImageEnView1.CurrentLayer ).LineWidth := 15;
ImageEnView1.MouseInteractLayers := [ mlClickCreateLineLayers, mlEditLayerPoints, mlRotateLayers ];
ImageEnView1.Update;


When I click and draw a line it is very small.

All so the color is not green.


I am looking here
https://www.imageen.com/help/index.php?topic=TIELayer

Thanks for any help.

xequte

38127 Posts

Posted - Sep 25 2020 :  00:24:04  Show Profile  Reply
Hi

This code only affects the current layer:

TIELineLayer( ImageEnView1.CurrentLayer ).LineColor := clGreen;
TIELineLayer( ImageEnView1.CurrentLayer ).LineWidth := 15;



You are wanting the default/next layers to be thick and green. So you need to do one of the following:

1. Add the code to the OnNewLayer event

procedure TfrmMain.ImageEnView1NewLayer(Sender: TObject; LayerIdx: integer; LayerKind: TIELayerKind);
begin
  if LayerKind = ielkLine then
  begin
    TIELineLayer( ImageEnView1.CurrentLayer ).LineColor := clGreen;
    TIELineLayer( ImageEnView1.CurrentLayer ).LineWidth := 15;
  end;
end;

https://www.imageen.com/help/TImageEnView.OnNewLayer.html


2. Add your preference to LayerDefaults:

ImageEnView1.LayerDefaults.Add( IELP_LineColor +'=clGreen' );
ImageEnView1.LayerDefaults.Add( IELP_LineWidth +'=15' );

https://www.imageen.com/help/TImageEnView.LayerDefaults.html

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