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
 PolyLine - Not as expected

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
Alan Posted - Mar 03 2022 : 02:46:10
Hi

Continuing my ImageEN education/experiments.

The code below should draw a line the height of the control, centered.
But I only get a line 95px high.

I can set the layer height to the control height. But, then if I make the line point half height way it still has the full height of the control.

Is there a setting I'm missing - I cant seem to make sense of this.

I would like to create a polyline of 4 points so that I can move each of the points independently.

Thanks again

Alan


var
PolyLayer: TIEPolylineLayer;
begin
  ImageEnView1.LayersAdd(ielkPolyline);
   PolyLayer := TIEPolylineLayer(ImageEnView1.CurrentLayer);
   PolyLayer.ClearAllPoints;
   PolyLayer.PolylineClosed:= False;
   PolyLayer.BorderWidth:= 4;
   PolyLayer.BorderColor:= clGreen;
   PolyLayer.AddPoint(1,0);
   PolyLayer.AddPoint(1,ImageEnView1.ClientHeight);
   PolyLayer.PosX:= Round(ImageEnView1.ClientWidth/2);
   PolyLayer.Posy:=0;
  PolyLayer.Update;
end;
2   L A T E S T    R E P L I E S    (Newest First)
Alan Posted - Mar 07 2022 : 02:48:32
Thanks Nigel

Thant makes sense now.
xequte Posted - Mar 03 2022 : 21:15:24
Hi Alan

By default, AddPoint() values are a range from 0-1000 (within the width/height of the layer).

Please change the value base to iepbClientArea:

https://www.imageen.com/help/TIEPolylineLayer.AddPoint.html

Nigel
Xequte Software
www.imageen.com