lcl, win32: fix 2 bitmap mask problems

git-svn-id: trunk@12559 -
This commit is contained in:
paul 2007-10-23 07:11:18 +00:00
parent 3be134f57d
commit b9e61a07f7
2 changed files with 4 additions and 1 deletions

View File

@ -319,7 +319,7 @@ begin
if H < 0 then Exit;
// calc destination rowstride
RS := (W * ABPP) shr 3;
RS := (W * ABPP + 7) shr 3;
x := RS and SIZEMAP[ADestinationEnd];
if x <> 0
then Inc(RS, 1 + SIZEMAP[ADestinationEnd] - x);

View File

@ -192,6 +192,9 @@ class procedure TWin32WSCustomImageList.AddData(AListHandle: TLCLIntfHandle; ACo
else P^ := P^ shl 1;
Inc(AData);
end;
// finish mask shifting
if (AWidth and $7) <> 0 then
P^ := P^ shl (7 - (AWidth mod 8));
Inc(LinePtr, MaskStride);
end;