- Timestamp:
- Jan 3, 2024, 4:53:46 PM (11 months ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/Term.pas
r513 r515 2771 2771 begin 2772 2772 SaveSettings; 2773 CityDlg.CloseAction := None;2773 if Assigned(FCityDlg) then CityDlg.CloseAction := None; 2774 2774 ApplyToVisibleForms(faClose); 2775 2775 if LogDlg.Visible then -
trunk/Packages/CevoComponents/ScreenTools.pas
r514 r515 695 695 PixelSrc.NextLine; 696 696 end; 697 src.EndUpdate;697 Src.EndUpdate; 698 698 Dst.EndUpdate; 699 699 end; … … 709 709 SrcPixel: TPixelPointer; 710 710 DstPixel: TPixelPointer; 711 begin 711 DstWidth, DstHeight: Integer; 712 SrcWidth, SrcHeight: Integer; 713 begin 714 if xDst < 0 then begin 715 Width := Width + xDst; 716 xSrc := xSrc - xDst; 717 xDst := 0; 718 end; 719 if yDst < 0 then begin 720 Height := Height + yDst; 721 ySrc := ySrc - yDst; 722 yDst := 0; 723 end; 724 if xDst + Width > Dst.Width then 725 Width := Dst.Width - xDst; 726 if yDst + Height > Dst.Height then 727 Height := Dst.Height - yDst; 728 if (Width < 0) or (Height < 0) then 729 Exit; 730 DstWidth := ScaleToNativeDist(xDst, Width); 731 DstHeight := ScaleToNativeDist(yDst, Height); 732 SrcWidth := ScaleToNativeDist(xSrc, Width); 733 SrcHeight := ScaleToNativeDist(ySrc, Height); 712 734 xDst := ScaleToNative(xDst); 713 735 yDst := ScaleToNative(yDst); 714 736 xSrc := ScaleToNative(xSrc); 715 737 ySrc := ScaleToNative(ySrc); 716 Width := ScaleToNative(Width);717 Height := ScaleToNative(Height);718 if xDst < 0 then begin719 Width := Width + xDst;720 xSrc := xSrc - xDst;721 xDst := 0;722 end;723 if yDst < 0 then begin724 Height := Height + yDst;725 ySrc := ySrc - yDst;726 yDst := 0;727 end;728 if xDst + Width > ScaleToNative(Dst.Width) then729 Width := ScaleToNative(Dst.Width) - xDst;730 if yDst + Height > ScaleToNative(Dst.Height) then731 Height := ScaleToNative(Dst.Height) - yDst;732 if (Width < 0) or (Height < 0) then733 Exit;734 738 735 739 Src.BeginUpdate; … … 737 741 SrcPixel := TPixelPointer.Create(Src, xSrc, ySrc); 738 742 DstPixel := TPixelPointer.Create(Dst, xDst, yDst); 739 for iy := 0 to Height - 1 do begin740 for ix := 0 to Width - 1 do begin743 for iy := 0 to DstHeight - 1 do begin 744 for ix := 0 to DstWidth - 1 do begin 741 745 trans := SrcPixel.PixelB * 2; // green channel = transparency 742 746 amp1 := SrcPixel.PixelG * 2; … … 756 760 end; 757 761 758 SrcPixel.NextPixel;762 if ix < SrcWidth - 1 then SrcPixel.NextPixel; 759 763 DstPixel.NextPixel; 760 764 end; 761 SrcPixel.NextLine; 765 if iy < SrcHeight - 1 then SrcPixel.NextLine 766 else SrcPixel.SetX(0); 762 767 DstPixel.NextLine; 763 768 end; -
trunk/Packages/DpiControls/Dpi.Common.pas
r514 r515 185 185 DstWidth, DstHeight: Integer; 186 186 SrcWidth, SrcHeight: Integer; 187 ReduceWidth, ReduceHeight: Integer;188 187 begin 189 188 {$IFDEF WINDOWS} … … 198 197 SrcWidth := ScaleToNativeDist(XSrc, Width); 199 198 SrcHeight := ScaleToNativeDist(YSrc, Height); 200 if (Frac(ScaleFloatToNative(XSrc)) > 0) or201 (Frac(ScaleFloatToNative(X)) > 0) then ReduceWidth := 1202 else ReduceWidth := 0;203 if (Frac(ScaleFloatToNative(YSrc)) > 0) or204 (Frac(ScaleFloatToNative(Y)) > 0) then ReduceHeight := 1205 else ReduceHeight := 0;206 199 if (DstWidth = SrcWidth) and (DstHeight = SrcHeight) then begin 207 200 Result := LCLIntf.BitBlt(DestDC, ScaleToNative(X), ScaleToNative(Y), … … 210 203 end else begin 211 204 Result := LCLIntf.BitBlt(DestDC, ScaleToNative(X), ScaleToNative(Y), 212 DstWidth - ReduceWidth, DstHeight - ReduceHeight, SrcDC,205 SrcWidth, SrcHeight, SrcDC, 213 206 ScaleToNative(XSrc), ScaleToNative(YSrc), Rop); 214 207 … … 224 217 ScaleToNative(XSrc), ScaleToNative(YSrc) + SrcHeight - (DstHeight - SrcHeight), Rop); 225 218 end; 226 227 219 { Result := LCLIntf.StretchBlt(DestDC, ScaleToNative(X), ScaleToNative(Y), 228 220 DstWidth, DstHeight, SrcDC,
Note:
See TracChangeset
for help on using the changeset viewer.