Changeset 41 for trunk/ScreenTools.pas
- Timestamp:
- Jan 9, 2017, 9:41:20 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ScreenTools.pas
r40 r41 48 48 procedure ImageOp_CCC(bmp: TBitmap; x, y, w, h, Color0, Color1, 49 49 Color2: integer); 50 function BitBltCanvas(DestCanvas: TCanvas; X, Y, Width, Height: Integer; SrcCanvas: TCanvas; 51 XSrc, YSrc: Integer; Rop: DWORD): Boolean; 50 52 procedure SLine(ca: TCanvas; x0, x1, y: integer; cl: TColor); 51 53 procedure DLine(ca: TCanvas; x0, x1, y: integer; cl0, cl1: TColor); … … 192 194 193 195 uses 194 Directories, Sound, ButtonBase, ButtonA, ButtonB, 195 196 Registry; 196 Directories, Sound, Registry; 197 197 198 198 var … … 713 713 exit; 714 714 715 Src.BeginUpdate; 715 716 dst.BeginUpdate; 716 717 for iy := 0 to h - 1 do … … 725 726 if trans <> $FF then 726 727 begin 727 Value := (DstLine[xDst + ix][0] * trans + ( Color2 shr 16and $FF) * amp2728 + ( Color1 shr 16and $FF) * amp1) div $FF;728 Value := (DstLine[xDst + ix][0] * trans + ((Color2 shr 16) and $FF) * amp2 729 + ((Color1 shr 16) and $FF) * amp1) div $FF; 729 730 if Value < 256 then 730 731 DstLine[xDst + ix][0] := Value 731 732 else 732 733 DstLine[xDst + ix][0] := 255; 733 Value := (DstLine[xDst + ix][1] * trans + ( Color2 shr 8and $FF) * amp2734 + ( Color1 shr 8and $FF) * amp1) div $FF;734 Value := (DstLine[xDst + ix][1] * trans + ((Color2 shr 8) and $FF) * amp2 735 + ((Color1 shr 8) and $FF) * amp1) div $FF; 735 736 if Value < 256 then 736 737 DstLine[xDst + ix][1] := Value … … 746 747 end 747 748 end; 749 Src.EndUpdate; 748 750 dst.EndUpdate; 749 751 end; … … 802 804 BitBlt(dst.Canvas.Handle, xDst, yDst, Width, Height, 803 805 GrExt[HGr].Data.Canvas.Handle, xGr, yGr, SRCPAINT); 806 end; 807 808 function BitBltCanvas(DestCanvas: TCanvas; X, Y, Width, Height: Integer; SrcCanvas: TCanvas; XSrc, 809 YSrc: Integer; Rop: DWORD): Boolean; 810 begin 811 Assert(Rop = SRCCOPY); 812 DestCanvas.CopyRect(Rect(X, X, Width, Height), SrcCanvas, 813 Rect(XSrc, YSrc, XSrc + Width, YSrc + Height)); 804 814 end; 805 815 … … 1441 1451 procedure PaintLogo(ca: TCanvas; x, y, clLight, clShade: integer); 1442 1452 begin 1443 BitBlt (LogoBuffer.Canvas.Handle, 0, 0, wLogo, hLogo, ca.Handle, x,1453 BitBltCanvas(LogoBuffer.Canvas, 0, 0, wLogo, hLogo, ca, x, 1444 1454 y, SRCCOPY); 1445 1455 ImageOp_BCC(LogoBuffer, Templates, 0, 0, 1, 1, wLogo, hLogo,
Note:
See TracChangeset
for help on using the changeset viewer.