This repository has been archived on 2024-02-26. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
MyPresenter1.0/bgrabitmap/multishapeline.inc
2015-02-08 16:52:18 -08:00

61 lines
1.9 KiB
PHP

begin
for k := 0 to NbShapeRows-1 do
with shapeRow[shapeRowsList[k]],shapes[shapeRowsList[k]] do
begin
if texture <> nil then
begin
texture.ScanMoveTo(densMinx,yb);
ScanNextFunc := @texture.ScanNextPixel;
pdens := density+(densMinX-minx);
for xb := densMinx to densMaxx do
with sums[xb-minx] do
begin
j := pdens^; inc(pdens);
if j <> 0 then
begin
ec := GammaExpansion(ScanNextFunc());
{$ifdef PARAM_ANTIALIASINGFACTOR}
w := DivByAntialiasPrecision65536(j*ec.alpha);
{$else}
w := (j*ec.alpha) shr 16;
{$endif}
if w <> 0 then
begin
inc(sumR,ec.red*w);
inc(sumG,ec.green*w);
inc(sumB,ec.blue*w);
inc(sumA,w);
end;
end else
ScanNextFunc();
end;
end else
begin
ec := color;
pdens := density+(densMinX-minx);
for xb := densMinx to densMaxx do
with sums[xb-minx] do
begin
j := pdens^; inc(pdens);
if j <> 0 then
begin
{$ifdef PARAM_ANTIALIASINGFACTOR}
w := DivByAntialiasPrecision65536(j*ec.alpha);
{$else}
w := (j*ec.alpha) shr 16;
{$endif}
if w <> 0 then
begin
inc(sumR,ec.red*w);
inc(sumG,ec.green*w);
inc(sumB,ec.blue*w);
inc(sumA,w);
end;
end;
end;
end;
end;
end
{$undef PARAM_ANTIALIASINGFACTOR}