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
 Line Layer Default Properties

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
grant1842 Posted - Sep 24 2020 : 22:16:11
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.
1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Sep 25 2020 : 00:24:04
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