2 writes to Palette
System.Drawing.Common.Tests (2)
System\Drawing\BitmapTests.cs (2)
1447
Assert.Throws<NullReferenceException>(() => bitmap.
Palette
= null);
1458
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.
Palette
= palette);
57 references to Palette
System.Drawing.Common.Tests (50)
mono\System.Drawing.Imaging\IconCodecTests.cs (8)
52
Assert.Empty(bmp.
Palette
.Entries);
60
Assert.Empty(image.
Palette
.Entries);
100
Assert.Empty(bmp.
Palette
.Entries);
248
Assert.Empty(bmp.
Palette
.Entries);
453
Assert.Empty(bmp.
Palette
.Entries);
675
Assert.Empty(bmp.
Palette
.Entries);
933
Assert.Empty(bmp.
Palette
.Entries);
1843
Assert.Empty(bmp.
Palette
.Entries);
mono\System.Drawing.Imaging\JpegCodecTests.cs (2)
68
ColorPalette cp = bmp.
Palette
;
195
Assert.Empty(bmp.
Palette
.Entries);
mono\System.Drawing.Imaging\PngCodecTests.cs (23)
49
Assert.Equal(0, bmp.
Palette
.Flags);
50
Assert.Equal(2, bmp.
Palette
.Entries.Length);
51
Assert.Equal(-16777216, bmp.
Palette
.Entries[0].ToArgb());
52
Assert.Equal(-1, bmp.
Palette
.Entries[1].ToArgb());
254
Assert.Empty(bmp.
Palette
.Entries);
359
Assert.Equal(0, bmp.
Palette
.Flags);
360
Assert.Equal(16, bmp.
Palette
.Entries.Length);
361
Assert.Equal(-12106173, bmp.
Palette
.Entries[0].ToArgb());
362
Assert.Equal(-10979957, bmp.
Palette
.Entries[1].ToArgb());
363
Assert.Equal(-8879241, bmp.
Palette
.Entries[2].ToArgb());
364
Assert.Equal(-10381134, bmp.
Palette
.Entries[3].ToArgb());
365
Assert.Equal(-7441574, bmp.
Palette
.Entries[4].ToArgb());
366
Assert.Equal(-6391673, bmp.
Palette
.Entries[5].ToArgb());
367
Assert.Equal(-5861009, bmp.
Palette
.Entries[6].ToArgb());
368
Assert.Equal(-3824008, bmp.
Palette
.Entries[7].ToArgb());
369
Assert.Equal(-5790569, bmp.
Palette
.Entries[8].ToArgb());
370
Assert.Equal(-6178617, bmp.
Palette
.Entries[9].ToArgb());
371
Assert.Equal(-4668490, bmp.
Palette
.Entries[10].ToArgb());
372
Assert.Equal(-5060143, bmp.
Palette
.Entries[11].ToArgb());
373
Assert.Equal(-3492461, bmp.
Palette
.Entries[12].ToArgb());
374
Assert.Equal(-2967099, bmp.
Palette
.Entries[13].ToArgb());
375
Assert.Equal(-2175574, bmp.
Palette
.Entries[14].ToArgb());
376
Assert.Equal(-1314578, bmp.
Palette
.Entries[15].ToArgb());
mono\System.Drawing\BitmapTests.cs (9)
820
ColorPalette pal = bmp.
Palette
;
854
ColorPalette pal = bmp.
Palette
;
1128
ColorPalette pal = bmp.
Palette
;
1179
Assert.Empty(b.
Palette
.Entries);
1266
Assert.Empty(bitmap.
Palette
.Entries);
1277
Assert.Empty(image.
Palette
.Entries);
1292
Assert.Empty(bitmap.
Palette
.Entries);
1304
Assert.Empty(image.
Palette
.Entries);
1313
Assert.Empty(image2.
Palette
.Entries);
System\Drawing\BitmapTests.cs (4)
706
Assert.Empty(result.
Palette
.Entries);
1440
Assert.Equal(expectedEntries, bitmap.
Palette
.Entries.Select(c => c.ToArgb()));
1454
ColorPalette palette = bitmap.
Palette
;
1457
AssertExtensions.Throws<ArgumentException>(null, () => bitmap.
Palette
);
System\Drawing\IconTests.cs (2)
526
Assert.Empty(bitmap.
Palette
.Entries);
564
Assert.Empty(bitmap.
Palette
.Entries);
System\Drawing\Imaging\ImageAttributesTests.cs (2)
1308
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.GetAdjustedPalette(bitmap.
Palette
, ColorAdjustType.Default));
1324
AssertExtensions.Throws<ArgumentException>(null, () => imageAttr.GetAdjustedPalette(bitmap.
Palette
, type));
System.Windows.Forms.Tests (7)
System\Windows\Forms\ControlPaintTests.cs (7)
42
Assert.Empty(result.
Palette
.Entries);
67
Assert.Empty(result.
Palette
.Entries);
113
Assert.Empty(result.
Palette
.Entries);
145
Assert.Empty(result.
Palette
.Entries);
178
Assert.Empty(result.
Palette
.Entries);
221
Assert.Equal(new Color[] { Color.FromArgb(255, 0, 0, 0), Color.FromArgb(255, 255, 255, 255) }, result.
Palette
.Entries);
246
Assert.Equal(new Color[] { Color.FromArgb(255, 0, 0, 0), Color.FromArgb(255, 255, 255, 255) }, result.
Palette
.Entries);