Search found 6 matches

by Jens Gr.
Wed Jan 21, 2015 3:16 pm
Forum: VCL
Topic: Problem with TGDIPlusCanvas.TextWidth
Replies: 10
Views: 20143

Re: Problem with TGDIPlusCanvas.TextWidth

Hi, Long silence? I hope, you are interested in a solution... Here is a source code sample for better GDI+ text results. I have deleted your special code for publication. If you need the full code, please contact me per E-Mail. TTeeFontMetric=record Name : String; Height : Integer; Style : TFontStyl...
by Jens Gr.
Wed Jan 07, 2015 12:00 pm
Forum: VCL
Topic: TTeeCanvas3D Bug and Font Unit
Replies: 0
Views: 6800

TTeeCanvas3D Bug and Font Unit

Hi Steema Team, At first, I wish you a Happy New Year! And thank you for your big work! I use the TTeeCanvas3D and TGDIPlusCanvas on our owner draw TChart’s. But with the last 2014 version I have any problems: As I can see in the VCL version: You have included in the function TextOut() the new line ...
by Jens Gr.
Mon Dec 29, 2014 12:06 pm
Forum: VCL
Topic: Problem with TGDIPlusCanvas.TextWidth
Replies: 10
Views: 20143

Re: Problem with TGDIPlusCanvas.TextWidth

Hi, I have spent a few hours and checked the function MeasureCharacterRanges. I think, this is a good alternative for the GDI TextSize function. Here is the code: function TextSizeGP(Graphics:TGPgraphics; Text:string; Font:TGPFont):TSize; var format:TGPStringFormat; rect:TGPRectF; ranges: TCharacter...
by Jens Gr.
Tue Dec 23, 2014 12:31 pm
Forum: VCL
Topic: Problem with TGDIPlusCanvas.TextWidth
Replies: 10
Views: 20143

Re: Problem with TGDIPlusCanvas.TextWidth

Hi Yeray, I am a little confused. I have checked the same code with the old GDI Canvas and the buggy result is as follow: Bild1.png Here the code: const fHeight=-11; procedure TForm1.Draw3D1Paint(Sender: TObject; const ARect: TRect); var s:String; x,y:Integer; begin x:=10; y:=10; with Draw3D1.Canvas...
by Jens Gr.
Fri Dec 12, 2014 12:36 pm
Forum: VCL
Topic: Problem with TGDIPlusCanvas.TextWidth
Replies: 10
Views: 20143

Re: Problem with TGDIPlusCanvas.TextWidth

Hello, Thank you for the new code. But I think, this is not the solution. If you use Font.Size=8 (this is on 96dpi screens the same as font.height=-11), you will see the same bad result.... Can it be the problem with the TGPGraphics.MeasureString limitations?? Please see: http://www.codeproject.com/...
by Jens Gr.
Fri Dec 12, 2014 8:49 am
Forum: VCL
Topic: Problem with TGDIPlusCanvas.TextWidth
Replies: 10
Views: 20143

Problem with TGDIPlusCanvas.TextWidth

Hello, I have a problem with the TGDIPlusCanvas.TextWidth function in the TDraw3D box (with Std v2014.12.140923 on Win7 32bit). If I use the following code: procedure TForm1.Draw3D1Paint(Sender: TObject; const ARect: TRect); var s:String; x,y:Integer; begin x:=10; y:=10; with Draw3D1.Canvas do begin...