Hi,
I’ve finally gotten round to upgrading ImageEn from V8.6.0 to V9.2.6 in my application and have encountered a couple of issues around labelled arrows. My customers (police officers) use a lot of labelled arrows in the application, now with hundreds of saved IEN multi-layered files, some labels are quite long see enclosed examples. In version 8.6.0 the arrows were rendered correctly, however in 9.2.6 there is a number of problems:
1.When I now draw a labelled arrow it starts label to arrow where in 8.6.0 it used to be arrow (start) to label (end).
2. Where arrows are drawn pointing left the right side of the label is cropped. If you move the arrow to the right side of the label it is OK. If you zoom in on the cropped label more of it appears.
3. The position of the arrows head has moved further out sometimes now covering what it was pointing at.
I had to make a change in the code when initialising pre-drawing as the TIELineLayer AutoSize property has now disappeared, see below:
case AnnoDrawOpt of
doArrow :
begin
(LLyr as TIELineLayer).FillColor := IEPalPen.SelectedColor;
(LLyr as TIELineLayer).LabelPosition := ielpHide;
{ MTS534. ImageEn Update V8.6.0 to V9.2.6. Autosize no longer a property. }
{ Need to disable autosize so it is draw correctly on live display. }
// (LLyr as TIELineLayer).AutoSize := False;
end; { doArrow }
doLblArrow :
begin
(LLyr as TIELineLayer).LabelPosition := ielpAtEnd;
(LLyr as TIELineLayer).ShapeSize := ArrowSize;
(LLyr as TIELineLayer).LabelText := StrArrowLbl;
(LLyr as TIELineLayer).LabelFillColor := clWhite;
(LLyr as TIELineLayer).LabelFont.Color := clBlack;
(LLyr as TIELineLayer).LabelFont.Size := FontDlg.Font.Size;
(LLyr as TIELineLayer).LabelFont.Name := FontDlg.Font.Name;
{ MTS534. ImageEn Update V8.6.0 to V9.2.6. Autosize no longer a property. }
// (LLyr as TIELineLayer).AutoSize := True;
{ MTS228. Font scaling issue change from truncate to shrink. }
(LLyr as TIELineLayer).TextOverflow := ieoShrink;
(LLyr as TIELineLayer).LabelShape := iesRoundRect;
(LLyr as TIELineLayer).SoftShadow.Enabled := True;
(LLyr as TIELineLayer).SoftShadow.OffsetX := 1;
(LLyr as TIELineLayer).SoftShadow.OffsetY := 1;
end; { doLblArrow }
doHollowCircle, doHollowRect :
The other issue occurred initialising the TImageEnView component, I use a lot of dynamically created non-visible components which I load up, then their content get Assigned to visible TImageEnView’s as items get selected. I got an Exception ‘invalid parent window path’ on the following code:
FIEViewAnno := TImageEnView.Create( nil );
{ MTS534. ImageEn upgrade Comment out setting visibility causes unknown parent path exception . }
// FIEViewAnno.Visible := False;
FIEViewAnno.Background := clBlack;
FIEViewAnno.BorderStyle := bsNone;
FIEViewAnno.StyleElements := [];
I commented out setting Visible to false as this caused an exception, in the testing I’ve done so far it hasn’t caused an issue – non of these TImageEnView’s will have a parent window control – do you think this will be OK as I’m mainly loading images and assigning them to visible parented components.
If you could have a look at the labelled arrow issue for me that would be really appreciated as it is so commonly used. I had a similar issues with labelled arrows on previous versions.
attach/PaulAtMass/202011205545_V01-H264%20Moped%20Anno01_ANNO_1.ien