Page 1 of 1

Text and Zoom

PostPosted: January 7th, 2006, 9:09 am
by Mirage
Hello!

I wrote in a node ' Win Your Self'. When I press 2 times zoom + the ' W' of ' Win' disappears and the ' f' of ' Self' disappears.

I want to know that it is the problem and it is possible to correct it.

Normal Node:


Node after zoom:

PostPosted: January 7th, 2006, 2:33 pm
by Kambiz
It's SimpleGraph's bug. I'll fix it on the next release.

Thank you!

PostPosted: January 9th, 2006, 6:24 pm
by elias
To Kambiz:
What's the reason you decided not to use a Tlabel but creating your own drawing-text routines?

I was playing with your checkers game :) nice.

PostPosted: January 12th, 2006, 10:50 am
by Kambiz
To be independent of Delphi's controls, felexibility, and not using extra resources.

Have fun with playing checkers. :)

PostPosted: January 17th, 2006, 7:16 am
by Mirage
Hello



Please give me a solution!


thank you in advance.

PostPosted: January 24th, 2006, 4:39 pm
by kokkoras
So, this old issue

(http://www.delphiarea.com/forum/viewtopic.php?t=519 - #4)

is still here but in a different twist... :D

A working temporary solution is to increase the width of the node, by a small number of pixels, say 1 or 2. Thats what I did in the time of the above old post.

edit: The above statement is obviously wrong :oops: . It's not the node's width. Is must be related to some clipping rectangle.

PostPosted: February 3rd, 2006, 12:06 pm
by Kambiz
As a quick fix, please open SimpleGraph.pas and look for:

Code: Select all
procedure TGraphNode.DrawText(Canvas: TCanvas);

inside the implementation of the method, look for:

Code: Select all
    DrawTextFlags := DT_NOPREFIX or DT_EDITCONTROL or
      TextAlignFlags[Alignment] or TextLayoutFlags[Layout];

Then, replace it with:

Code: Select all
    DrawTextFlags := DT_NOPREFIX or DT_EDITCONTROL or DT_NOCLIP or
      TextAlignFlags[Alignment] or TextLayoutFlags[Layout];

Eventually, save the file and compile your code.

PostPosted: February 5th, 2006, 10:55 am
by kokkoras
Kambiz wrote:As a quick fix, ......


Why is it a quick fix? Are there any side effects?

PostPosted: February 5th, 2006, 4:44 pm
by Kambiz
There's no side effect at all. :cf: :wink:

PostPosted: February 6th, 2006, 8:38 am
by Mirage
Thank you Kambiz!

Thank you very much. You solved a big problem for me.

Thank to my ALLAH god;

Thanks :wink: :)