[haiku-bluetooth] B_RGBA32 Problem Code

  • From: Joerg Meyer <joerg.meyer@xxxxxxxxx>
  • To: haiku-bluetooth <haiku-bluetooth@xxxxxxxxxxxxx>
  • Date: Sun, 29 Mar 2009 14:25:34 +0200

Here the missed code, sorry!

 BRect iconRect(0,0,31,31);
    BBitmap *icon=new BBitmap(iconRect, B_RGBA32);
    owner->SetDrawingMode(B_OP_ALPHA);
        owner->SetBlendingMode(B_PIXEL_ALPHA, B_ALPHA_OVERLAY);

    switch (fClass.GetMajorDeviceClass()) {
        case 1: // computer
            icon->SetBits(kterminalBits,32*32, 0, B_RGBA32);
            break;
        case 4: // audio/video
            icon->SetBits(kmediaBits,32*32, 0, B_RGBA32);
            break;
        default:
            icon->SetBits(kbluetoothBits,32*32, 0, B_RGBA32);
            break;
    }
    owner->DrawBitmap(icon, iconRect,BRect(itemRect.left + INSETS,
itemRect.top + INSETS,
            itemRect.left + INSETS + PIXELS_FOR_ICON, itemRect.top + INSETS
+ PIXELS_FOR_ICON));


-- 
Joerg Meyer
<mailto://joerg.meyer@xxxxxxxxx>

Other related posts: