mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-02 21:57:37 +02:00
Fix wrong SELECT size with multiple SELECT elements in OSR mode
This commit is contained in:
parent
9962fecc4e
commit
beb287e22c
@ -666,6 +666,7 @@ var
|
||||
TempForcedResize : boolean;
|
||||
TempBitmapData : TBitmapData;
|
||||
TempBitmap : TBitmap;
|
||||
TempSrcRect, TempDstRect : TRectF;
|
||||
begin
|
||||
try
|
||||
FResizeCS.Acquire;
|
||||
@ -770,7 +771,18 @@ begin
|
||||
end;
|
||||
|
||||
if FShowPopup and (FPopUpBitmap <> nil) then
|
||||
Panel1.BufferDraw(FPopUpRect.Left, FPopUpRect.Top, FPopUpBitmap);
|
||||
begin
|
||||
TempSrcRect := RectF(0, 0,
|
||||
min(FPopUpRect.Width, FPopUpBitmap.Width),
|
||||
min(FPopUpRect.Height, FPopUpBitmap.Height));
|
||||
|
||||
TempDstRect.Left := FPopUpRect.Left / GlobalCEFApp.DeviceScaleFactor;
|
||||
TempDstRect.Top := FPopUpRect.Top / GlobalCEFApp.DeviceScaleFactor;
|
||||
TempDstRect.Right := TempDstRect.Left + (TempSrcRect.Width / GlobalCEFApp.DeviceScaleFactor);
|
||||
TempDstRect.Bottom := TempDstRect.Top + (TempSrcRect.Height / GlobalCEFApp.DeviceScaleFactor);
|
||||
|
||||
Panel1.BufferDraw(FPopUpBitmap, TempSrcRect, TempDstRect);
|
||||
end;
|
||||
end;
|
||||
|
||||
if (type_ = PET_VIEW) then
|
||||
@ -814,10 +826,15 @@ procedure TFMXExternalPumpBrowserFrm.chrmosrPopupSize( Sender : TObject;
|
||||
const browser : ICefBrowser;
|
||||
const rect : PCefRect);
|
||||
begin
|
||||
FPopUpRect.Left := rect.x;
|
||||
FPopUpRect.Top := rect.y;
|
||||
FPopUpRect.Right := rect.x + rect.width - 1;
|
||||
FPopUpRect.Bottom := rect.y + rect.height - 1;
|
||||
if (GlobalCEFApp <> nil) then
|
||||
begin
|
||||
LogicalToDevice(rect^, GlobalCEFApp.DeviceScaleFactor);
|
||||
|
||||
FPopUpRect.Left := rect.x;
|
||||
FPopUpRect.Top := rect.y;
|
||||
FPopUpRect.Right := rect.x + rect.width - 1;
|
||||
FPopUpRect.Bottom := rect.y + rect.height - 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TFMXExternalPumpBrowserFrm.chrmosrTooltip( Sender : TObject;
|
||||
|
@ -664,6 +664,7 @@ var
|
||||
TempForcedResize : boolean;
|
||||
TempBitmapData : TBitmapData;
|
||||
TempBitmap : TBitmap;
|
||||
TempSrcRect, TempDstRect : TRectF;
|
||||
begin
|
||||
try
|
||||
FResizeCS.Acquire;
|
||||
@ -768,7 +769,18 @@ begin
|
||||
end;
|
||||
|
||||
if FShowPopup and (FPopUpBitmap <> nil) then
|
||||
FMXBufferPanel1.BufferDraw(FPopUpRect.Left, FPopUpRect.Top, FPopUpBitmap);
|
||||
begin
|
||||
TempSrcRect := RectF(0, 0,
|
||||
min(FPopUpRect.Width, FPopUpBitmap.Width),
|
||||
min(FPopUpRect.Height, FPopUpBitmap.Height));
|
||||
|
||||
TempDstRect.Left := FPopUpRect.Left / GlobalCEFApp.DeviceScaleFactor;
|
||||
TempDstRect.Top := FPopUpRect.Top / GlobalCEFApp.DeviceScaleFactor;
|
||||
TempDstRect.Right := TempDstRect.Left + (TempSrcRect.Width / GlobalCEFApp.DeviceScaleFactor);
|
||||
TempDstRect.Bottom := TempDstRect.Top + (TempSrcRect.Height / GlobalCEFApp.DeviceScaleFactor);
|
||||
|
||||
FMXBufferPanel1.BufferDraw(FPopUpBitmap, TempSrcRect, TempDstRect);
|
||||
end;
|
||||
end;
|
||||
|
||||
if (type_ = PET_VIEW) then
|
||||
@ -805,10 +817,15 @@ end;
|
||||
procedure TBrowserFrame.FMXChromium1PopupSize(Sender: TObject;
|
||||
const browser: ICefBrowser; const rect: PCefRect);
|
||||
begin
|
||||
FPopUpRect.Left := rect.x;
|
||||
FPopUpRect.Top := rect.y;
|
||||
FPopUpRect.Right := rect.x + rect.width - 1;
|
||||
FPopUpRect.Bottom := rect.y + rect.height - 1;
|
||||
if (GlobalCEFApp <> nil) then
|
||||
begin
|
||||
LogicalToDevice(rect^, GlobalCEFApp.DeviceScaleFactor);
|
||||
|
||||
FPopUpRect.Left := rect.x;
|
||||
FPopUpRect.Top := rect.y;
|
||||
FPopUpRect.Right := rect.x + rect.width - 1;
|
||||
FPopUpRect.Bottom := rect.y + rect.height - 1;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TBrowserFrame.FMXChromium1StatusMessage(Sender: TObject;
|
||||
|
@ -389,6 +389,7 @@ var
|
||||
TempWidth, TempHeight, TempScanlineSize : integer;
|
||||
TempBufferBits : Pointer;
|
||||
TempForcedResize : boolean;
|
||||
TempSrcRect : TRect;
|
||||
begin
|
||||
try
|
||||
FResizeCS.Acquire;
|
||||
@ -465,7 +466,13 @@ begin
|
||||
end;
|
||||
|
||||
if FShowPopup and (FPopUpBitmap <> nil) then
|
||||
Panel1.BufferDraw(FPopUpRect.Left, FPopUpRect.Top, FPopUpBitmap);
|
||||
begin
|
||||
TempSrcRect := Rect(0, 0,
|
||||
min(FPopUpRect.Right - FPopUpRect.Left, FPopUpBitmap.Width),
|
||||
min(FPopUpRect.Bottom - FPopUpRect.Top, FPopUpBitmap.Height));
|
||||
|
||||
Panel1.BufferDraw(FPopUpBitmap, TempSrcRect, FPopUpRect);
|
||||
end;
|
||||
end;
|
||||
|
||||
Panel1.EndBufferDraw;
|
||||
|
@ -455,6 +455,7 @@ var
|
||||
TempWidth, TempHeight, TempScanlineSize : integer;
|
||||
TempBufferBits : Pointer;
|
||||
TempForcedResize : boolean;
|
||||
TempSrcRect : TRect;
|
||||
begin
|
||||
try
|
||||
FResizeCS.Acquire;
|
||||
@ -531,7 +532,13 @@ begin
|
||||
end;
|
||||
|
||||
if FShowPopup and (FPopUpBitmap <> nil) then
|
||||
Panel1.BufferDraw(FPopUpRect.Left, FPopUpRect.Top, FPopUpBitmap);
|
||||
begin
|
||||
TempSrcRect := Rect(0, 0,
|
||||
min(FPopUpRect.Right - FPopUpRect.Left, FPopUpBitmap.Width),
|
||||
min(FPopUpRect.Bottom - FPopUpRect.Top, FPopUpBitmap.Height));
|
||||
|
||||
Panel1.BufferDraw(FPopUpBitmap, TempSrcRect, FPopUpRect);
|
||||
end;
|
||||
end;
|
||||
|
||||
Panel1.EndBufferDraw;
|
||||
|
@ -416,7 +416,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TOSRExternalPumpBrowserFrm.chrmosrPaint(Sender : TObject;
|
||||
procedure TOSRExternalPumpBrowserFrm.chrmosrPaint( Sender : TObject;
|
||||
const browser : ICefBrowser;
|
||||
kind : TCefPaintElementType;
|
||||
dirtyRectsCount : NativeUInt;
|
||||
@ -431,6 +431,7 @@ var
|
||||
TempWidth, TempHeight, TempScanlineSize : integer;
|
||||
TempBufferBits : Pointer;
|
||||
TempForcedResize : boolean;
|
||||
TempSrcRect : TRect;
|
||||
begin
|
||||
try
|
||||
FResizeCS.Acquire;
|
||||
@ -507,7 +508,13 @@ begin
|
||||
end;
|
||||
|
||||
if FShowPopup and (FPopUpBitmap <> nil) then
|
||||
Panel1.BufferDraw(FPopUpRect.Left, FPopUpRect.Top, FPopUpBitmap);
|
||||
begin
|
||||
TempSrcRect := Rect(0, 0,
|
||||
min(FPopUpRect.Right - FPopUpRect.Left, FPopUpBitmap.Width),
|
||||
min(FPopUpRect.Bottom - FPopUpRect.Top, FPopUpBitmap.Height));
|
||||
|
||||
Panel1.BufferDraw(FPopUpBitmap, TempSrcRect, FPopUpRect);
|
||||
end;
|
||||
end;
|
||||
|
||||
Panel1.EndBufferDraw;
|
||||
|
@ -450,6 +450,7 @@ var
|
||||
TempWidth, TempHeight, TempScanlineSize : integer;
|
||||
TempBufferBits : Pointer;
|
||||
TempForcedResize : boolean;
|
||||
TempSrcRect : TRect;
|
||||
begin
|
||||
try
|
||||
FResizeCS.Acquire;
|
||||
@ -526,7 +527,13 @@ begin
|
||||
end;
|
||||
|
||||
if FShowPopup and (FPopUpBitmap <> nil) then
|
||||
Panel1.BufferDraw(FPopUpRect.Left, FPopUpRect.Top, FPopUpBitmap);
|
||||
begin
|
||||
TempSrcRect := Rect(0, 0,
|
||||
min(FPopUpRect.Right - FPopUpRect.Left, FPopUpBitmap.Width),
|
||||
min(FPopUpRect.Bottom - FPopUpRect.Top, FPopUpBitmap.Height));
|
||||
|
||||
Panel1.BufferDraw(FPopUpBitmap, TempSrcRect, FPopUpRect);
|
||||
end;
|
||||
end;
|
||||
|
||||
Panel1.EndBufferDraw;
|
||||
|
@ -22,8 +22,8 @@
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="313"/>
|
||||
<CursorPos X="21" Y="328"/>
|
||||
<TopLine Value="456"/>
|
||||
<CursorPos X="19" Y="488"/>
|
||||
<UsageCount Value="26"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
@ -62,55 +62,55 @@
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="323" Column="23" TopLine="299"/>
|
||||
<Caret Line="271" TopLine="270"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="95" Column="36" TopLine="84"/>
|
||||
<Caret Line="286" Column="70" TopLine="270"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="271" TopLine="270"/>
|
||||
<Caret Line="307" Column="11" TopLine="295"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="286" Column="70" TopLine="270"/>
|
||||
<Caret Line="322" TopLine="313"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="307" Column="11" TopLine="295"/>
|
||||
<Caret Line="503" Column="53" TopLine="488"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="322" TopLine="313"/>
|
||||
<Caret Line="92" Column="27" TopLine="92"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="503" Column="53" TopLine="488"/>
|
||||
<Caret Line="503" Column="11" TopLine="499"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="92" Column="27" TopLine="92"/>
|
||||
<Caret Line="201" Column="11" TopLine="166"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="503" Column="11" TopLine="499"/>
|
||||
<Caret Line="982" Column="68" TopLine="963"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="201" Column="11" TopLine="166"/>
|
||||
<Caret Line="307" Column="39" TopLine="301"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="982" Column="68" TopLine="963"/>
|
||||
<Caret Line="82" Column="44" TopLine="77"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="307" Column="39" TopLine="301"/>
|
||||
<Caret Line="957" TopLine="939"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="82" Column="44" TopLine="77"/>
|
||||
<Caret Line="958" TopLine="939"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
@ -122,63 +122,63 @@
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="957" TopLine="939"/>
|
||||
<Caret Line="960" TopLine="939"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="958" TopLine="939"/>
|
||||
<Filename Value="OSRExternalPumpBrowser.lpr"/>
|
||||
<Caret Line="61" Column="63" TopLine="41"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="960" TopLine="939"/>
|
||||
<Caret Line="169" Column="11" TopLine="153"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="OSRExternalPumpBrowser.lpr"/>
|
||||
<Caret Line="61" Column="63" TopLine="41"/>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="198" TopLine="176"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="169" Column="11" TopLine="153"/>
|
||||
<Caret Line="170" Column="82" TopLine="148"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="198" TopLine="176"/>
|
||||
<Caret Line="217" Column="51" TopLine="196"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="170" Column="82" TopLine="148"/>
|
||||
<Caret Line="105" Column="30" TopLine="71"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="217" Column="51" TopLine="196"/>
|
||||
<Caret Line="282" TopLine="278"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="105" Column="30" TopLine="71"/>
|
||||
<Caret Line="945" Column="91" TopLine="926"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="282" TopLine="278"/>
|
||||
<Caret Line="944" Column="91" TopLine="925"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="945" Column="91" TopLine="926"/>
|
||||
<Caret Line="943" Column="110" TopLine="925"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="944" Column="91" TopLine="925"/>
|
||||
<Caret Line="7" Column="109"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="943" Column="110" TopLine="925"/>
|
||||
<Caret Line="168" Column="26" TopLine="145"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="7" Column="109"/>
|
||||
<Caret Line="337" Column="52" TopLine="312"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="uOSRExternalPumpBrowser.pas"/>
|
||||
<Caret Line="168" Column="26" TopLine="145"/>
|
||||
<Caret Line="94" Column="15" TopLine="81"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
<RunParams>
|
||||
|
@ -398,7 +398,8 @@ var
|
||||
TempWidth, TempHeight : integer;
|
||||
TempBufferBits : Pointer;
|
||||
TempForcedResize : boolean;
|
||||
TempBitmap : TBitmap;
|
||||
TempBitmap : TBitmap;
|
||||
TempSrcRect : TRect;
|
||||
begin
|
||||
try
|
||||
FResizeCS.Acquire;
|
||||
@ -478,7 +479,13 @@ begin
|
||||
TempBitmap.EndUpdate;
|
||||
|
||||
if FShowPopup and (FPopUpBitmap <> nil) then
|
||||
Panel1.BufferDraw(FPopUpRect.Left, FPopUpRect.Top, FPopUpBitmap);
|
||||
begin
|
||||
TempSrcRect := Rect(0, 0,
|
||||
min(FPopUpRect.Right - FPopUpRect.Left, FPopUpBitmap.Width),
|
||||
min(FPopUpRect.Bottom - FPopUpRect.Top, FPopUpBitmap.Height));
|
||||
|
||||
Panel1.BufferDraw(FPopUpBitmap, TempSrcRect, FPopUpRect);
|
||||
end;
|
||||
end;
|
||||
|
||||
Panel1.EndBufferDraw;
|
||||
|
@ -38,8 +38,8 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="168"/>
|
||||
<CursorPos X="26" Y="171"/>
|
||||
<TopLine Value="359"/>
|
||||
<CursorPos X="23" Y="375"/>
|
||||
<UsageCount Value="42"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="40" Y="262" ID="4"/>
|
||||
@ -229,7 +229,7 @@
|
||||
<UsageCount Value="10"/>
|
||||
</Unit26>
|
||||
</Units>
|
||||
<JumpHistory Count="15" HistoryIndex="14">
|
||||
<JumpHistory Count="17" HistoryIndex="16">
|
||||
<Position1>
|
||||
<Filename Value="usimplelazosrbrowser.pas"/>
|
||||
<Caret Line="204" Column="63" TopLine="19"/>
|
||||
@ -290,6 +290,14 @@
|
||||
<Filename Value="usimplelazosrbrowser.pas"/>
|
||||
<Caret Line="65" TopLine="59"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="usimplelazosrbrowser.pas"/>
|
||||
<Caret Line="197" Column="68" TopLine="168"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="usimplelazosrbrowser.pas"/>
|
||||
<Caret Line="91" Column="15" TopLine="85"/>
|
||||
</Position17>
|
||||
</JumpHistory>
|
||||
<RunParams>
|
||||
<FormatVersion Value="2"/>
|
||||
|
@ -371,7 +371,8 @@ var
|
||||
TempWidth, TempHeight : integer;
|
||||
TempBufferBits : Pointer;
|
||||
TempForcedResize : boolean;
|
||||
TempBitmap : TBitmap;
|
||||
TempBitmap : TBitmap;
|
||||
TempSrcRect : TRect;
|
||||
begin
|
||||
try
|
||||
FResizeCS.Acquire;
|
||||
@ -451,7 +452,13 @@ begin
|
||||
TempBitmap.EndUpdate;
|
||||
|
||||
if FShowPopup and (FPopUpBitmap <> nil) then
|
||||
Panel1.BufferDraw(FPopUpRect.Left, FPopUpRect.Top, FPopUpBitmap);
|
||||
begin
|
||||
TempSrcRect := Rect(0, 0,
|
||||
min(FPopUpRect.Right - FPopUpRect.Left, FPopUpBitmap.Width),
|
||||
min(FPopUpRect.Bottom - FPopUpRect.Top, FPopUpBitmap.Height));
|
||||
|
||||
Panel1.BufferDraw(FPopUpBitmap, TempSrcRect, FPopUpRect);
|
||||
end;
|
||||
end;
|
||||
|
||||
Panel1.EndBufferDraw;
|
||||
|
@ -124,7 +124,8 @@ type
|
||||
function InvalidatePanel : boolean;
|
||||
function BeginBufferDraw : boolean;
|
||||
procedure EndBufferDraw;
|
||||
procedure BufferDraw(x, y : integer; const aBitmap : TBitmap);
|
||||
procedure BufferDraw(x, y : integer; const aBitmap : TBitmap); overload;
|
||||
procedure BufferDraw(const aBitmap : TBitmap; const aSrcRect, aDstRect : TRect); overload;
|
||||
function UpdateBufferDimensions(aWidth, aHeight : integer) : boolean;
|
||||
function BufferIsResized(aUseMutex : boolean = True) : boolean;
|
||||
procedure CreateIMEHandler;
|
||||
@ -677,6 +678,11 @@ begin
|
||||
if (FBuffer <> nil) then FBuffer.Canvas.Draw(x, y, aBitmap);
|
||||
end;
|
||||
|
||||
procedure TBufferPanel.BufferDraw(const aBitmap : TBitmap; const aSrcRect, aDstRect : TRect);
|
||||
begin
|
||||
if (FBuffer <> nil) then FBuffer.Canvas.CopyRect(aDstRect, aBitmap.Canvas, aSrcRect);
|
||||
end;
|
||||
|
||||
function TBufferPanel.UpdateBufferDimensions(aWidth, aHeight : integer) : boolean;
|
||||
begin
|
||||
Result := False;
|
||||
|
@ -97,7 +97,7 @@ type
|
||||
procedure InvalidatePanel;
|
||||
function BeginBufferDraw : boolean;
|
||||
procedure EndBufferDraw;
|
||||
procedure BufferDraw(x, y : integer; const aBitmap : TBitmap);
|
||||
procedure BufferDraw(const aBitmap : TBitmap; const aSrcRect, aDstRect : TRectF);
|
||||
function UpdateBufferDimensions(aWidth, aHeight : integer) : boolean;
|
||||
function BufferIsResized(aUseMutex : boolean = True) : boolean;
|
||||
function ScreenToClient(aPoint : TPoint) : TPoint; overload;
|
||||
@ -417,31 +417,22 @@ begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
procedure TFMXBufferPanel.BufferDraw(x, y : integer; const aBitmap : TBitmap);
|
||||
var
|
||||
TempSrc, TempDst : TRectF;
|
||||
TempScale : single;
|
||||
procedure TFMXBufferPanel.BufferDraw(const aBitmap : TBitmap; const aSrcRect, aDstRect : TRectF);
|
||||
begin
|
||||
if (FBuffer <> nil) then
|
||||
begin
|
||||
TempScale := ScreenScale;
|
||||
TempSrc := TRectF.Create(0, 0, aBitmap.Width, aBitmap.Height);
|
||||
TempDst := TRectF.Create(x, y, x + (aBitmap.Width / TempScale), y + (aBitmap.Height / TempScale));
|
||||
|
||||
if FBuffer.Canvas.BeginScene then
|
||||
try
|
||||
FBuffer.Canvas.DrawBitmap(aBitmap, TempSrc, TempDst, 1, FHighSpeedDrawing);
|
||||
finally
|
||||
FBuffer.Canvas.EndScene;
|
||||
end;
|
||||
end;
|
||||
if FBuffer.Canvas.BeginScene then
|
||||
try
|
||||
FBuffer.Canvas.DrawBitmap(aBitmap, aSrcRect, aDstRect, 1, FHighSpeedDrawing);
|
||||
finally
|
||||
FBuffer.Canvas.EndScene;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TFMXBufferPanel.UpdateBufferDimensions(aWidth, aHeight : integer) : boolean;
|
||||
var
|
||||
TempScale : single;
|
||||
begin
|
||||
Result := False;
|
||||
Result := False;
|
||||
TempScale := ScreenScale;
|
||||
|
||||
if ((FBuffer = nil) or
|
||||
|
@ -2,7 +2,7 @@
|
||||
"UpdateLazPackages" : [
|
||||
{
|
||||
"ForceNotify" : true,
|
||||
"InternalVersion" : 108,
|
||||
"InternalVersion" : 109,
|
||||
"Name" : "cef4delphi_lazarus.lpk",
|
||||
"Version" : "80.0.8.0"
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user