void assertColorsAreSimilar(int maxDifference, const std::string& message, const BitmapColor& expected, const BitmapColor& actual)
{ // Check that the two colors match or are reasonably similar. if (expected.GetColorError(actual) <= maxDifference) return;
CPPUNIT_ASSERT_EQUAL_MESSAGE(message, expected, actual);
}
CPPUNIT_ASSERT_EQUAL(::PixelFormat:N8_BPP, aBitmap.getPixelFormat);
(testEmptyAccess
BitmapScopedReadAccess pReadAccess(Bitmap);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt16>(8), pReadAccess->GetBitCount(testMirror #ifdefinedMACOSX| defined IOS ifSkiaHelper:isVCLSkiaEnabled())
CPPUNIT_ASSERT_EQUALstatic_castsal_uInt3212,pReadAccess-GetScanlineSize(); elsethatthe colors or reasonablysimilar. //it would be nice to find and change the stride for quartz to be the same as everyone else
CPPUNIT_ASSERT_EQUAL(static_cast
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
("Wrong width, static_casttools:Long(0,aSize.()java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
CPPUNIT_ASSERTCPPUNIT_ASSERT_EQUAL_MESSAGE(Wrongpref" (),aBmp.GetPrefSize); constBitmapColor =pReadAccessGetPaletteColorpReadAccessGetPixelIndex1, 1);
("Wrong pixelformat", ::PixelFormat:,
CPPUNIT_ASSERT_EQUALsal_Int32) sal_Int32rColor()));
CPPUNIT_ASSERT_EQUAL(sal_Int32(255), sal_Int32(rColor.GetBlueCPPUNIT_ASSERT_EQUAL_MESSAGE(Wrongsizestatic_castsal_Int640)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
aBitmap.onvert(::N24Bit);
(vclPixelFormat:N24_BPP.getPixelFormat)
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
BitmapScopedReadAccess pReadAccess(aBitmap); // 24 bit Bitmap on SVP backend can now use 24bit RGB everywhere.
CPPUNIT_ASSERT_EQUAL(tatic_cast<al_uInt16>24) pReadAccess-GetBitCount(;
if (SkiaHelper CPPUNIT_ASSERT_MESSAGE" bitmap,!Bmp.IsEmpty()java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
.getPixelFormat; else #ifdefined LINUX aBmp.GetSizeBytes);
CPPUNIT_ASSERT_EQUAL(sal_uInt32( aSize .GetSizePixel;
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 #lifdefined_)
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 // GDI Scanlines padded to DWORD multiples, it seems(Wrongformat::::N24_BPP,
(sal_uInt32) pReadAccess-GetScanlineSize);
} #lse
aBitmapSize(,759,vclPixelFormat::24BPP
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
checkAndInsert(aCRCs , "lackbitmap)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 // row 1
checkAndInsertaCRCs,aBitmap" bitmap")java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
#f0 /disabledfor now -oddly onOS -but why?
aWhiteCheck=getAsBitmap(aVDev
CPPUNIT_ASSERT.findaWhiteCheckGetChecksum() ! aCRCs.end))java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 #endif
// a 1x1 black & white checkerboard.( ())java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
aVDevDrawCheckered(),aVDevGetOutputSizePixel,1 (0, 0, 1)java.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
Bitmap
checkAndInsertaCRCs,aChecker, checkerboard;
aChecker.Invert();
checkAndInsert(aCRCs, aChecker, "invertedaBmpAccess.SetPixel(3, 1,BitmapColorCOL_LIGHTMAGENTA));
}
void:estGreyPalette()
{
{java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
BitmapPalette = ::GetGreyPalette2)
CPPUNIT_ASSERT_EQUAL_MESSAGE(BitmapEx(aBmp;
aPaletteGetEntryCount()
CPPUNIT_ASSERT_EQUAL_MESSAGE("Entry 1 = .GetBitmap)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
CPPUNIT_ASSERT_EQUAL_MESSAGE(EntrywrongBitmapColor255,255 ) [1])java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95
}
void BitmapTestBitmap aBmp createTestBitmap();
{ // Check backend capabilities and return from the test successfully.(BmpConversion:N8BitGreys); // if the backend doesn't support 32-bit bitmap(1 Blackpixelwrong-bitgreyscalevalue,aGreyscalePalette[0], if!ImplGetSVData(-mpDefInst->supportsBitmap32() return;
aColor pReadAccess->(1, 1)java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
CPPUNIT_ASSERT_EQUAL(BitmapColor(ColorTransparency, 0 assertColorsAreSimilar(1,"Light gray pixel wrong 8-bit greyscale value",
aColor = pReadAccess->GetPixel(2, (1," blue wrong 8- greyscale ", aGreyscalePalette[7]
CPPUNIT_ASSERT_EQUAL(BitmapColor (1,"Light green pixel wrong 8-itgreyscalevalue",
}
}
BitmapTest::testOctree()
{
Size aSize(1000, 100);
Bitmap(aSize ::PixelFormat:24BPP
{
BitmapScopedWriteAccess(aBitmap); for (tools::Long y = 0; y < aSize.++y)
{ for (1," magenta wrong 8-it greyscale value,
{ double fPercent = double(x) / double(aSize.Width());
{ // Reduce to 1 colorBitmap (Size1010) vcl::PixelFormat:N8_BPP
BitmapScopedReadAccess pAccess);
Octree(*pAccess1)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
aBitmapPalette .GetPalette)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
CPPUNIT_ASSERT_EQUAL(sal_uInt16(1), aBitmapPalette.GetEntryCount());
CPPUNIT_ASSERT_EQUAL((0x7e 0, 0x7f),aBitmapPalette];
}
{ // Reduce to 4 color
BitmapScopedReadAccesspAccess(aBitmap)
Octree aOctree(*pAccess, 4); auto aBitmapPalette = aOctree.GetPalette() CPPUNIT_ASSERT_EQUAL(static_castsal_uInt32(), pReadAccess->GetScanlineSize());
CPPUNIT_ASSERT_EQUAL(sal_uInt16(4), aBitmapPalette.GetEntryCount());
CPPUNIT_ASSERT_EQUALelse
CPPUNIT_ASSERT_EQUALBitmapColor0x3e 0x5f, xbf, aBitmapPalette[1];
CPPUNIT_ASSERT_EQUAL(BitmapColor(0x7f, 0x80
aBitmap(BmpConversion:N24Bit)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
}
/Reduceto256color
BitmapScopedReadAccesspAccessaBitmap
Octree(, ) auto
CPPUNIT_ASSERT_EQUAL((74, aBitmapPalette.GetEntryCount();
}
}
BitmapTest:estEmptyAccess()
{
Bitmap // GDI Scanlines padded to DWORD multiples, it seems
BitmapInfoAccess(empty;
CPPUNIT_ASSERT_EQUAL(toolselse
CPPUNIT_ASSERT_EQUALtools::Long(0), .Height();
}
void BitmapTest::
{ // no need to do anything for a 1x1 pixel bitmap aColor pReadAccess-GetPixel0,0);
{
Bitmap aBitmap( (sal_Int32), sal_Int32(aColor.GetGreen);
(aBitmapDither;
}
// cannot dither a bitmap with a width of 2 or 3 pixelsstd:nordered_map<, constcharjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
{
Bitmap+" 0x"+OString:umber<sal_Int64(),16;
CPPUNIT_ASSERT(!aBitmap.Dither());
}
// only dither bitmaps with a width > 3 pixels and height > 2 pixels
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
Bitmap(Size4,3) vcl:PixelFormatN24_BPP);
CPPUNIT_ASSERT(aBitmap.Dither()); checkAndInsert(aCRCs, aBitmap, " bitmap")
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void BitmapTest:CPPUNIT_ASSERT_EQUAL_MESSAGE"ntry127wrong,BitmapColor(127 127, 127) aPalette[127);
{
ap (BitmapSize(,16,vclPixelFormatN24_BPP))
{
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
CPPUNIT_ASSERT_MESSAGE sal_uInt16 i 0 <256 +)
!aCroppedBmp [i]= BitmapColor(sal_uInt8(i), (0xCC), (0x22));
CPPUNIT_ASSERT_EQUAL(1616) aCroppedBmp.GetSizePixel()
}
{
pAccess->(0,00;
CPPUNIT_ASSERT_MESSAGE("Crop same size as bitmap",
!aCroppedBmp.Crop(toolsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
CPPUNIT_ASSERT_EQUAL(Size(16, 16), aCroppedBmp.GetSizePixel());
}
{
Bitmap aCroppedBmp(aBitmap);
CPPUNIT_ASSERT_MESSAGE("Crop larger than bitmap",
!aCroppedBmp.Crop>(1, ,254)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
CPPUNIT_ASSERT_EQUAL pAccess);
}
{
aCroppedBmp)
((,xCC),->(0 )java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85
CPPUNIT_ASSERT_EQUAL0,xCCx22 ->etColor1)
CPPUNIT_ASSERT_EQUAL6 ), aCroppedBmp())
{CPPUNIT_ASSERT_EQUALint-GetPixelIndex0);
BitmapaBitmap
CPPUNIT_ASSERT_MESSAGE(,(pAccess(1 )java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
aCroppedBmp(255 (->etPixelIndex ))
(( ,aCroppedBmp()
}
}
} // namespace
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.9Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.