You've already forked lazarus-ccr
* Initial implementation of alpha blending for gtk, gtk2, qt
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1093 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
32
components/virtualtreeview-new/trunk/VTGraphics.pas
Executable file
32
components/virtualtreeview-new/trunk/VTGraphics.pas
Executable file
@ -0,0 +1,32 @@
|
||||
unit VTGraphics;
|
||||
|
||||
{$mode delphi}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
DelphiCompat, Types, LCLIntf, LCLType;
|
||||
|
||||
type
|
||||
// Describes the mode how to blend pixels.
|
||||
TBlendMode = (
|
||||
bmConstantAlpha, // apply given constant alpha
|
||||
bmPerPixelAlpha, // use alpha value of the source pixel
|
||||
bmMasterAlpha, // use alpha value of source pixel and multiply it with the constant alpha value
|
||||
bmConstantAlphaAndColor // blend the destination color with the given constant color und the constant alpha value
|
||||
);
|
||||
|
||||
|
||||
|
||||
procedure AlphaBlend(Source, Destination: HDC; const R: TRect; const Target: TPoint; Mode: TBlendMode; ConstantAlpha, Bias: Integer);
|
||||
|
||||
function CalculateScanline(Bits: Pointer; Width, Height, Row: Integer): Pointer;
|
||||
|
||||
function GetBitmapBitsFromBitmap(Bitmap: HBITMAP): Pointer;
|
||||
|
||||
implementation
|
||||
|
||||
{$i vtgraphicsi.inc}
|
||||
|
||||
end.
|
||||
|
Reference in New Issue
Block a user