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
 Draw Measurements result into the image

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
harry stahl Posted - Feb 21 2023 : 12:39:53
I like the measurement functionality.

How can I write the information about the measurement info (the same appeareance) into the image, in the mouseup-event?



HS
7   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Feb 28 2023 : 16:06:39
That looks correct. The left 5.03 is not anti-aliased because LayersFastDrawing is enabled, and the right 5.03 is the sizing hint.

Are you looking for the text to be above the line?

http://www.imageen.com/help/TIELineLayer.LabelPosition.html

Nigel
Xequte Software
www.imageen.com
harry stahl Posted - Feb 28 2023 : 13:20:03
I see this, if I move the mouse:


HS

xequte Posted - Feb 27 2023 : 20:10:32
Hi Harry

Strictly speaking it is better to use OnLayerNotify to know the get the end of layer creation:

procedure TForm1.ImageEnView1LayerNotifyEx(Sender: TObject; layer: Integer;
    event: TIELayerEvent);
begin
  if event = ielCreated then
    ImageEnView1.LayersMerge();
end;


But I cannot see any issues either way. Can you post some screenshots of what you are seeing?



Nigel
Xequte Software
www.imageen.com
harry stahl Posted - Feb 27 2023 : 12:16:12
I do it so:

1. I prepare for writing: ievpic.MouseInteractLayers := [ mlCreateLineLayers ];
2. In newlayer-event I do this:

procedure TF_ieLayerTempl.ievpicNewLayer(Sender: TObject; LayerIdx: Integer; LayerKind: TIELayerKind);
begin
ievpic.Layers[Layeridx].RulerMode := TIERulermode.iermLabel;
end;

And in Mouseup-Event I call ievpic.layersmerge.

But as an result I get a black rectangle at the left side (or top), with the meausrement-info in it and connected with a line. But the measurement is not right, it seems that the size of the rectangle.with (or hight, depends on the direction the mouse is moved) is substracted.

Do I something wrong here?



HS
xequte Posted - Feb 21 2023 : 22:29:50
A layer will persist as long as needed (even if RulerMode is enabled). If you are wanting the same effect as the measure interactions (e.g. miMeasureLength), but have the layer persist after positioning, then use a layer creation interaction, such as mlClickCreateLineLayers (and in the OnNewLayer event enable RulerMode).

Then to "burn" it into the image you can use LayersMerge();

Nigel
Xequte Software
www.imageen.com
harry stahl Posted - Feb 21 2023 : 17:35:27
Yes, thank you, but my question is, how to paint the rulerinfo persistent to the image (not as layer, that escapes, when the measurement ends).

HS
xequte Posted - Feb 21 2023 : 14:23:16
Hi Harry

You can add a TIELayer with ruler mode enabled:

http://www.imageen.com/help/TIELayer.RulerMode.html

Nigel
Xequte Software
www.imageen.com