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
 How do you enter a polyline manually?

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
NotTooSmart Posted - Jun 30 2021 : 09:33:50
Hi There,

I have a list of points(x,y) that represent a polyline drawing. How do you enter them manually? Thanks for the help.

Jorge
5   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jul 01 2021 : 21:27:04
Hi Jorge

The code assumes you have added a polyline layer.

You should check the layer type like this:


var
  shapePoints: array of TPoint;
begin
  If ImageEnView1.CurrentLayer.Kind <> ielkPolyline then
    Raise Exception.Create( 'Not a polyline' );

  SetLength( shapePoints, 3 );
  shapePoints[0] := Point( 500, 0 );
  shapePoints[1] := Point( 1000, 1000 );
  shapePoints[2] := Point( 0, 1000 );
  TIEPolylineLayer( ImageEnView1.CurrentLayer ).SetPoints( shapePoints, True );
  ImageEnView1.Update();
end;


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

To add a polyline use:

ImageEnView1.LayersAdd( ielkPolyline );

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

Nigel
Xequte Software
www.imageen.com
NotTooSmart Posted - Jul 01 2021 : 13:07:53
I am finding that this software is not very clear to understand and debug issues. a further definition of the error is shown here. Does anyone knows why am I getting the error? I added a button that calls this program in the Layers Demo:

var
shapePoints: array of TPoint;
begin
SetLength( shapePoints, 3 );
shapePoints[0] := Point( 500, 0 );
shapePoints[1] := Point( 1000, 1000 );
shapePoints[2] := Point( 0, 1000 );
TIEPolylineLayer( ImageEnView1.CurrentLayer ).SetPoints( shapePoints, True );
ImageEnView1.Update();
end;

And here is the error:






Jorge
NotTooSmart Posted - Jun 30 2021 : 20:16:27
Also, how do I force the polyline created to draw into layer 5 for example?

Jorge
NotTooSmart Posted - Jun 30 2021 : 19:52:28
Thanks Nigel,

I created a button and tested your sample code, but I got an error. See picture. How do I correct it?



Jorge
xequte Posted - Jun 30 2021 : 15:45:48
Hi Jorge

Do you mean like this:

var
  shapePoints: array of TPoint;
begin
  SetLength( shapePoints, 3 );
  shapePoints[0] := Point( 500, 0 );
  shapePoints[1] := Point( 1000, 1000 );
  shapePoints[2] := Point( 0, 1000 );
  TIEPolylineLayer( ImageEnView1.CurrentLayer ).SetPoints( shapePoints, True );
  ImageEnView1.Update();
end;


Nigel
Xequte Software
www.imageen.com