Documented usage of BBitmap::SetBits().

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@980 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2002-09-03 16:59:24 +00:00
parent 145ab60f00
commit 5097cb0445
2 changed files with 6 additions and 0 deletions

View File

@ -2056,6 +2056,7 @@ AppFileInfoTest::IconTest()
BBitmap icon(BRect(0, 0, 15, 15), B_RGB32);
CHK(appFileInfo.GetIcon(&icon, B_MINI_ICON) == B_OK);
BBitmap icon2(BRect(0, 0, 15, 15), B_RGB32);
// SetBits() can be used, since there's no row padding for 16x16.
icon2.SetBits(fIconM2->Bits(), fIconM2->BitsLength(), 0, B_CMAP8);
CHK(icon_equal(&icon, &icon2));
// large
@ -2064,6 +2065,7 @@ AppFileInfoTest::IconTest()
BBitmap icon3(BRect(0, 0, 31, 31), B_RGB32);
CHK(appFileInfo.GetIcon(&icon3, B_LARGE_ICON) == B_OK);
BBitmap icon4(BRect(0, 0, 31, 31), B_RGB32);
// SetBits() can be used, since there's no row padding for 32x32.
icon4.SetBits(fIconL2->Bits(), fIconL2->BitsLength(), 0, B_CMAP8);
CHK(icon_equal(&icon3, &icon4));
#endif
@ -2418,6 +2420,7 @@ AppFileInfoTest::IconForTypeTest()
BBitmap icon(BRect(0, 0, 15, 15), B_RGB32);
CHK(appFileInfo.GetIconForType(testType1, &icon, B_MINI_ICON) == B_OK);
BBitmap icon2(BRect(0, 0, 15, 15), B_RGB32);
// SetBits() can be used, since there's no row padding for 16x16.
icon2.SetBits(fIconM2->Bits(), fIconM2->BitsLength(), 0, B_CMAP8);
CHK(icon_equal(&icon, &icon2));
// large
@ -2427,6 +2430,7 @@ AppFileInfoTest::IconForTypeTest()
CHK(appFileInfo.GetIconForType(testType1, &icon3, B_LARGE_ICON)
== B_OK);
BBitmap icon4(BRect(0, 0, 31, 31), B_RGB32);
// SetBits() can be used, since there's no row padding for 32x32.
icon4.SetBits(fIconL2->Bits(), fIconL2->BitsLength(), 0, B_CMAP8);
CHK(icon_equal(&icon3, &icon4));
#endif

View File

@ -528,6 +528,7 @@ NodeInfoTest::IconTest()
BBitmap icon(BRect(0, 0, 15, 15), B_RGB32);
CHK(nodeInfo.GetIcon(&icon, B_MINI_ICON) == B_OK);
BBitmap icon2(BRect(0, 0, 15, 15), B_RGB32);
// SetBits() can be used, since there's no row padding for 16x16.
icon2.SetBits(fIconM2->Bits(), fIconM2->BitsLength(), 0, B_CMAP8);
CHK(icon_equal(&icon, &icon2));
// large
@ -536,6 +537,7 @@ NodeInfoTest::IconTest()
BBitmap icon3(BRect(0, 0, 31, 31), B_RGB32);
CHK(nodeInfo.GetIcon(&icon3, B_LARGE_ICON) == B_OK);
BBitmap icon4(BRect(0, 0, 31, 31), B_RGB32);
// SetBits() can be used, since there's no row padding for 32x32.
icon4.SetBits(fIconL2->Bits(), fIconL2->BitsLength(), 0, B_CMAP8);
CHK(icon_equal(&icon3, &icon4));
#endif