|
From: <CW...@us...> - 2012-03-29 21:18:50
|
Revision: 1530
http://graphics32.svn.sourceforge.net/graphics32/?rev=1530&view=rev
Author: CWBudde
Date: 2012-03-29 21:18:44 +0000 (Thu, 29 Mar 2012)
Log Message:
-----------
* updated LCL backends (current stable Lazarus version is required!)
Modified Paths:
--------------
trunk/Source/Examples/Vcl/Drawing/RenderText_Ex/MainUnit.lfm
trunk/Source/GR32_Backends_LCL_Carbon.pas
trunk/Source/GR32_Backends_LCL_Win.pas
Modified: trunk/Source/Examples/Vcl/Drawing/RenderText_Ex/MainUnit.lfm
===================================================================
--- trunk/Source/Examples/Vcl/Drawing/RenderText_Ex/MainUnit.lfm 2012-03-29 20:39:08 UTC (rev 1529)
+++ trunk/Source/Examples/Vcl/Drawing/RenderText_Ex/MainUnit.lfm 2012-03-29 21:18:44 UTC (rev 1530)
@@ -11,7 +11,7 @@
Font.Height = -11
Font.Name = 'MS Sans Serif'
OnCreate = FormCreate
- LCLVersion = '0.9.29'
+ LCLVersion = '0.9.31'
object Image: TImage32
Left = 0
Height = 167
@@ -61,7 +61,6 @@
Top = 32
Width = 22
Caption = '-1'
- Color = clBtnFace
Down = True
GroupIndex = 1
Layout = blGlyphBottom
@@ -74,7 +73,6 @@
Top = 32
Width = 22
Caption = '0'
- Color = clBtnFace
GroupIndex = 1
Layout = blGlyphBottom
NumGlyphs = 0
@@ -87,7 +85,6 @@
Top = 32
Width = 22
Caption = '1'
- Color = clBtnFace
GroupIndex = 1
Layout = blGlyphBottom
NumGlyphs = 0
@@ -100,7 +97,6 @@
Top = 32
Width = 22
Caption = '2'
- Color = clBtnFace
GroupIndex = 1
Layout = blGlyphBottom
NumGlyphs = 0
@@ -113,7 +109,6 @@
Top = 32
Width = 22
Caption = '3'
- Color = clBtnFace
GroupIndex = 1
Layout = blGlyphBottom
NumGlyphs = 0
@@ -126,7 +121,6 @@
Top = 32
Width = 22
Caption = '4'
- Color = clBtnFace
GroupIndex = 1
Layout = blGlyphBottom
NumGlyphs = 0
Modified: trunk/Source/GR32_Backends_LCL_Carbon.pas
===================================================================
--- trunk/Source/GR32_Backends_LCL_Carbon.pas 2012-03-29 20:39:08 UTC (rev 1529)
+++ trunk/Source/GR32_Backends_LCL_Carbon.pas 2012-03-29 21:18:44 UTC (rev 1530)
@@ -445,24 +445,30 @@
procedure TLCLBackend.Textout(X, Y: Integer; const Text: string);
begin
{$IFDEF VerboseGR32Carbon}
- WriteLn('[TLCLBackend.Textout]',
- ' Self: ', IntToHex(PtrUInt(Self), 8));
+ WriteLn('[TLCLBackend.Textout]', ' Self: ', IntToHex(PtrUInt(Self), 8));
{$ENDIF}
if not Assigned(FCanvas) then GetCanvas;
- FCanvas.TextOut(X, Y, Text);
+ UpdateFont;
+
+ if not FOwner.MeasuringMode then
+ FCanvas.TextOut(X, Y, Text);
+
+ FOwner.Changed(DstRect);
end;
procedure TLCLBackend.Textout(X, Y: Integer; const ClipRect: TRect; const Text: string);
begin
{$IFDEF VerboseGR32Carbon}
- WriteLn('[TLCLBackend.Textout with ClipRect]',
- ' Self: ', IntToHex(PtrUInt(Self), 8));
+ WriteLn('[TLCLBackend.Textout with ClipRect]', ' Self: ',
+ IntToHex(PtrUInt(Self), 8));
{$ENDIF}
if not Assigned(FCanvas) then GetCanvas;
+ UpdateFont;
+
LCLIntf.ExtTextOut(FCanvas.Handle, X, Y, ETO_CLIPPED, @ClipRect, PChar(Text), Length(Text), nil);
end;
@@ -475,6 +481,8 @@
if not Assigned(FCanvas) then GetCanvas;
+ UpdateFont;
+
LCLIntf.DrawText(FCanvas.Handle, PChar(Text), Length(Text), DstRect, Flags);
end;
@@ -487,6 +495,8 @@
if not Assigned(FCanvas) then GetCanvas;
+ UpdateFont;
+
Result := FCanvas.TextExtent(Text);
end;
Modified: trunk/Source/GR32_Backends_LCL_Win.pas
===================================================================
--- trunk/Source/GR32_Backends_LCL_Win.pas 2012-03-29 20:39:08 UTC (rev 1529)
+++ trunk/Source/GR32_Backends_LCL_Win.pas 2012-03-29 21:18:44 UTC (rev 1530)
@@ -320,8 +320,6 @@
DC: HDC;
OldFont: HGDIOBJ;
begin
- Result := TextExtent(Text);
- (*
UpdateFont;
Result.cX := 0;
Result.cY := 0;
@@ -340,7 +338,6 @@
StockBitmap.Canvas.Unlock;
end;
end;
- *)
end;
procedure TLCLBackend.Textout(X, Y: Integer; const Text: String);
@@ -365,11 +362,6 @@
var
Extent: TSize;
begin
- Textout(X, Y, Text);
-
- {TODO: implement Widestring capable text method here...}
-
- (*
UpdateFont;
if not FOwner.MeasuringMode then
@@ -382,18 +374,12 @@
Extent := TextExtentW(Text);
FOwner.Changed(MakeRect(X, Y, X + Extent.cx + 1, Y + Extent.cy + 1));
- *)
end;
procedure TLCLBackend.TextoutW(X, Y: Integer; const ClipRect: TRect; const Text: Widestring);
var
Extent: TSize;
begin
- Textout(X, Y, ClipRect, Text);
-
- {TODO: implement Widestring capable text method here...}
-
- (*
UpdateFont;
if not FOwner.MeasuringMode then
@@ -401,7 +387,6 @@
Extent := TextExtentW(Text);
FOwner.Changed(MakeRect(X, Y, X + Extent.cx + 1, Y + Extent.cy + 1));
- *)
end;
procedure TLCLBackend.Textout(X, Y: Integer; const ClipRect: TRect; const Text: String);
@@ -419,18 +404,12 @@
procedure TLCLBackend.TextoutW(DstRect: TRect; const Flags: Cardinal; const Text: Widestring);
begin
- Textout(DstRect, Flags, Text);
-
- {TODO: implement Widestring capable text method here...}
-
- (*
UpdateFont;
if not FOwner.MeasuringMode then
DrawTextW(Handle, PWideChar(Text), Length(Text), DstRect, Flags);
FOwner.Changed(DstRect);
- *)
end;
procedure TLCLBackend.UpdateFont;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|