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