mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 10:59:19 +02:00
Misc: Switch x and y loops at several places. Issue #40231
This commit is contained in:
parent
7c60b62155
commit
77ae9452b9
@ -1868,8 +1868,8 @@ begin
|
||||
begin
|
||||
if (lImageWidth*lImageHeight)*4 > Length(lImageData) then
|
||||
raise Exception.Create(Format('[TvEPSVectorialReader.ExecutePaintingOperator] operator image: image data too small. Expected=%d Found=%d', [Length(lImageData), (lImageWidth*lImageHeight)*4]));
|
||||
for x := 0 to lImageWidth - 1 do
|
||||
for y := 0 to lImageHeight - 1 do
|
||||
for y := 0 to lImageHeight - 1 do
|
||||
for x := 0 to lImageWidth - 1 do
|
||||
begin
|
||||
lColorC := lImageData[(x+y*lImageWidth)*4] / $FF;
|
||||
lColorM := lImageData[(x+y*lImageWidth)*4+1] / $FF;
|
||||
@ -1886,8 +1886,8 @@ begin
|
||||
begin
|
||||
if (lImageWidth*lImageHeight)*3 > Length(lImageData) then
|
||||
raise Exception.Create(Format('[TvEPSVectorialReader.ExecutePaintingOperator] operator image: image data too small. Expected=%d Found=%d', [Length(lImageData), (lImageWidth*lImageHeight)*3]));
|
||||
for x := 0 to lImageWidth - 1 do
|
||||
for y := 0 to lImageHeight - 1 do
|
||||
for y := 0 to lImageHeight - 1 do
|
||||
for x := 0 to lImageWidth - 1 do
|
||||
begin
|
||||
lColor.Alpha := alphaOpaque;
|
||||
lColor.Red := lImageData[(x+y*lImageWidth)*3] * $101;
|
||||
|
@ -329,8 +329,8 @@ begin
|
||||
|
||||
lFile := TFileStream.Create('Terrain.raw', fmCreate);
|
||||
try
|
||||
for x := 0 to 1023 do
|
||||
for y := 0 to 1023 do
|
||||
for y := 0 to 1023 do
|
||||
for x := 0 to 1023 do
|
||||
begin
|
||||
lRed := lRasterImage.RasterImage.Colors[x, y].Red;
|
||||
lFile.WriteByte(Byte(lRed div $FF));
|
||||
|
@ -57,8 +57,8 @@ begin
|
||||
|
||||
AImage.SetRawImage(lRawImage);
|
||||
|
||||
for x := 0 to RAW_IMAGE_WIDTH - 1 do
|
||||
for y := 0 to RAW_IMAGE_HEIGHT - 1 do
|
||||
for y := 0 to RAW_IMAGE_HEIGHT - 1 do
|
||||
for x := 0 to RAW_IMAGE_WIDTH - 1 do
|
||||
begin
|
||||
lColor.Red := AStream.ReadByte() * $FF;
|
||||
AImage.Colors[x, y] := lColor;
|
||||
|
@ -500,8 +500,8 @@ begin
|
||||
begin
|
||||
TmpImage.Canvas.BrushCopy(IRect, FOriginal, ORect, FTransparentColor);
|
||||
with TmpImage do
|
||||
for X := 0 to Width - 1 do
|
||||
for Y := 0 to Height - 1 do
|
||||
for Y := 0 to Height - 1 do
|
||||
for X := 0 to Width - 1 do
|
||||
Canvas.Pixels[X, Y] := MapColor(Canvas.Pixels[X, Y]);
|
||||
FIndexs[State] := FGlyphList.AddMasked(TmpImage, TColor(ColorToRGB(clBtnFace)));
|
||||
end;
|
||||
|
@ -662,8 +662,8 @@ begin
|
||||
|
||||
if UseTransparentCopy then begin
|
||||
if Images[FCurrentFrame].Bitmap <> nil then
|
||||
for x := 0 to Images[FCurrentFrame].Bitmap.Width - 1 do
|
||||
for y := 0 to Images[FCurrentFrame].Bitmap.Height - 1 do
|
||||
for y := 0 to Images[FCurrentFrame].Bitmap.Height - 1 do
|
||||
for x := 0 to Images[FCurrentFrame].Bitmap.Width - 1 do
|
||||
if Images[FCurrentFrame].Bitmap.Canvas.Pixels[x, y] <>
|
||||
Images[FCurrentFrame].TransparentColor then begin
|
||||
if (x + Images[FCurrentFrame].XOffset < Bitmap.Width) and
|
||||
|
@ -105,11 +105,12 @@ begin
|
||||
FBitmap.Canvas.Brush.Style := bsSolid;
|
||||
FBitmap.Canvas.Brush.Color := colorBG;
|
||||
FBitmap.Canvas.Rectangle(0,0,7,7);
|
||||
for x := 0 to 7 do for y := 0 to 7 do
|
||||
begin
|
||||
if ((not Odd(x)) and (not Odd(y))) xor ((Odd(x)) and (Odd(y))) then
|
||||
FBitmap.Canvas.Pixels[x,y] := colorFG;
|
||||
end;
|
||||
for y := 0 to 7 do
|
||||
for x := 0 to 7 do
|
||||
begin
|
||||
if ((not Odd(x)) and (not Odd(y))) xor ((Odd(x)) and (Odd(y))) then
|
||||
FBitmap.Canvas.Pixels[x,y] := colorFG;
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor TPatternBitmap.Destroy;
|
||||
|
@ -300,8 +300,8 @@ begin
|
||||
W := (R.Right - R.Left - 1) div DX;
|
||||
H := (R.Bottom - R.Top - 1) div DY;
|
||||
|
||||
for X := 0 to W do
|
||||
for Y := 0 to H do
|
||||
for Y := 0 to H do
|
||||
for X := 0 to W do
|
||||
QtDC.drawPoint(R.Left + X * DX, R.Top + Y * DY + 1);
|
||||
finally
|
||||
QtDC.restore;
|
||||
|
@ -298,8 +298,8 @@ begin
|
||||
W := (R.Right - R.Left - 1) div DX;
|
||||
H := (R.Bottom - R.Top - 1) div DY;
|
||||
|
||||
for X := 0 to W do
|
||||
for Y := 0 to H do
|
||||
for Y := 0 to H do
|
||||
for X := 0 to W do
|
||||
QtDC.drawPoint(R.Left + X * DX, R.Top + Y * DY + 1);
|
||||
finally
|
||||
QtDC.restore;
|
||||
|
@ -298,8 +298,8 @@ begin
|
||||
W := (R.Right - R.Left - 1) div DX;
|
||||
H := (R.Bottom - R.Top - 1) div DY;
|
||||
|
||||
for X := 0 to W do
|
||||
for Y := 0 to H do
|
||||
for Y := 0 to H do
|
||||
for X := 0 to W do
|
||||
QtDC.drawPoint(R.Left + X * DX, R.Top + Y * DY + 1);
|
||||
finally
|
||||
QtDC.restore;
|
||||
|
Loading…
Reference in New Issue
Block a user