## Line problem (bug)

Please post bug reports, feature requests, or any question regarding the DELPHI AREA projects here.

### Line problem (bug)

There is a problem with line exactly horizontal or vertical, there is no hand to move this line. You can try it in your SGDemo.exe application. Select "Link/Line" and draw line exactly horizontal (for example from point 10, 10 to 100, 10), then click outside of the line! Now you can't move this line, becouse there is no hand on it.

Is there any way to resolve this problem ?
Member

Posts: 3
Joined: June 21st, 2007, 8:07 pm

I checked it out with v2.62 and didn't see any problem.
Kambiz

Kambiz

Posts: 2430
Joined: March 7th, 2003, 7:10 pm

This problem is in 2.62 but there is more detail:
- only where line is 1 pixel
- BeginStyle = none
- EndStyle = none (!)

and this linie must be exactly horizontal or vertical (NOT across)

Could you try again.
Member

Posts: 3
Joined: June 21st, 2007, 8:07 pm

Try to move this line ...
Attachments
line.jpg (136.08 KiB) Viewed 2124 times
Member

Posts: 3
Joined: June 21st, 2007, 8:07 pm

I could regenerate the bug.

To fix the problem, open SimpleGraph.pas and look for

Code: Select all
procedure TGraphLink.QueryVisualRect(out Rect: TRect);

then after

Code: Select all
  Margin := Pen.Width div 2;

insert

Code: Select all
  if Margin = 0 then Margin := 1;

Thank you!
Kambiz

Kambiz