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
 Arrow tip position offset when ObjPenWidth > 1 (ObjBeginShape = iesOUTARROW)

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
Mickael Posted - Jul 08 2026 : 05:25:30
Hi,
I'm using TImageEnVect in Delphi 10.2 to let users draw a freehand line and convert it into an arrow (tip placed at the starting point of the drawing).

Issue: When the arrow is drawn, the tip of the arrowhead appears slightly offset (up/left) from the actual starting point clicked by the user. The offset is small but very noticeable once the arrowhead shape is applied.

Code used to create the object:
pascalimageenvect.Cursor := crIECrossSight;
imageenvect.ObjBrushStyle[-1] := bsSolid;
imageenvect.ObjShapeWidth[-1] := dmFich.tParamsLARGEUR_BOUTS_FLECHES.Value;
imageenvect.ObjShapeHeight[-1] := dmFich.tParamsLONGUEUR_BOUTS_FLECHES.Value;
imageenvect.ObjPenWidth[-1] := dmFich.tParamsEPAISSEUR_FLECHES.Value;
imageenvect.ObjPenStyle[-1] := psSolid;
imageenvect.ObjAspectRatio[-1] := true;
ImageEnVect.ObjEndShape[-1] := iesNONE;
ImageEnVect.ObjBeginShape[-1] := iesOUTARROW;
imageenvect.MouseInteractVt := [miPutLineLabel];
imageenvect.InsertingPen.Color := COLOR_JAUNE;
imageenvect.InsertingPen.Mode := pmCopy;
imageenvect.InsertingPen.Width := 5;
imageenvect.InsertingPen.Style := psSolid;
imageenvect.MouseInteract := [];

What I've tested so far:

  • Setting ObjAspectRatio[-1] := false => no change, offset still present.
  • ObjPenWidth[-1] := 1 => the offset completely disappears.
  • Drawing a strictly horizontal line, then a strictly vertical line (with the original ObjPenWidth value) => the offset appears identically in both cases, so it doesn't seem to be related to the line angle or a trigonometric rounding issue.
  • Zoom level is currently above 100% — mentioning this in case it's relevant, though the offset behavior described above was consistent regardless.


Conclusion so far: The offset seems proportional to ObjPenWidth and appears to affect only the rendering of the arrowhead tip, not the underlying line coordinates (I checked with GetObjRect and the stored rectangle looks correct).

Question: Is there a separate property to control the pen/outline width of the arrowhead shape independently from the line's ObjPenWidth? Or is this a known rendering behavior/bug when combining a thick pen with iesOUTARROW?
Any guidance would be appreciated — happy to provide a screenshot showing the before/after offset if useful.

Thanks!

Image with ObjPenWidth[-1] := dmFich.tParamsEPAISSEUR_FLECHES.Value



Image with ObjPenWidth[-1] := 1



CALON Mickaël