mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Inline temporary variable.
This commit is contained in:
@@ -444,21 +444,20 @@ public sealed class BlockMap : ItemsControl
|
||||
using IDrawingContextImpl ctxi = _bitmap.CreateDrawingContext(null);
|
||||
using var ctx = new DrawingContext(ctxi, false);
|
||||
|
||||
int squareWidth = (sideLength - 2 * borderWidth) / colors.Length;
|
||||
int squareHeight = squareWidth;
|
||||
var x = 0;
|
||||
var y = 0;
|
||||
int squareWidth = (sideLength - 2 * borderWidth) / colors.Length;
|
||||
var x = 0;
|
||||
var y = 0;
|
||||
|
||||
foreach(Color color in colors)
|
||||
{
|
||||
ctx.FillRectangle(new SolidColorBrush(color), new Rect(x, y, squareWidth, squareHeight));
|
||||
ctx.FillRectangle(new SolidColorBrush(color), new Rect(x, y, squareWidth, squareWidth));
|
||||
x += squareWidth + 2 * borderWidth;
|
||||
|
||||
if(x < sideLength)
|
||||
continue;
|
||||
|
||||
x = 0;
|
||||
y += squareHeight + 2 * borderWidth;
|
||||
y += squareWidth + 2 * borderWidth;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user