Changeset 317 for GraphicTest/BGRABitmap/bgraqtbitmap.pas
- Timestamp:
- Feb 1, 2012, 3:02:33 PM (13 years ago)
- Location:
- GraphicTest/BGRABitmap
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
GraphicTest/BGRABitmap
-
Property svn:ignore
set to
lib
-
Property svn:ignore
set to
-
GraphicTest/BGRABitmap/bgraqtbitmap.pas
r210 r317 59 59 procedure TBGRAQtBitmap.SlowDrawTransparent(ABitmap: TBGRADefaultBitmap; 60 60 ACanvas: TCanvas; ARect: TRect); 61 var62 background, temp: TBGRADefaultBitmap;63 w, h: integer;64 65 61 begin 66 w := ARect.Right - ARect.Left; 67 h := ARect.Bottom - ARect.Top; 68 background := NewBitmap(w, h); 69 background.GetImageFromCanvas(ACanvas, ARect.Left, ARect.Top); 70 if (ABitmap.Width = w) and (ABitmap.Height = h) then 71 background.PutImage(0, 0, ABitmap, dmDrawWithTransparency) 72 else 73 begin 74 temp := ABitmap.Resample(w, h, rmSimpleStretch); 75 background.PutImage(0, 0, temp, dmDrawWithTransparency); 76 temp.Free; 77 end; 78 background.Draw(ACanvas, ARect.Left, ARect.Top, True); 79 background.Free; 62 ACanvas.Draw(0,0, ABitmap.Bitmap); 80 63 end; 81 64
Note:
See TracChangeset
for help on using the changeset viewer.