Ticket #5906: 0001-Draw-dragger-instead-of-using-predeffined-bitmap-dat.patch

File 0001-Draw-dragger-instead-of-using-predeffined-bitmap-dat.patch, 3.0 KB (added by dsjonny, 11 years ago)
  • src/kits/interface/Dragger.cpp

    From be535d83b62a3cccda0eae7d4da394b753bba3f8 Mon Sep 17 00:00:00 2001
    From: =?UTF-8?q?Dancs=C3=B3=20R=C3=B3bert?= <dancso.robert@d-rendszer.hu>
    Date: Fri, 4 Jan 2013 07:47:44 +0100
    Subject: [PATCH] Draw dragger instead of using predeffined bitmap data. This
     may correct the transparency problem.
    
    ---
     src/kits/interface/Dragger.cpp |   35 ++++++++++++++++++++++++++++++++---
     1 file changed, 32 insertions(+), 3 deletions(-)
    
    diff --git a/src/kits/interface/Dragger.cpp b/src/kits/interface/Dragger.cpp
    index cd7aae4..30b0107 100644
    a b BDragger::Draw(BRect update)  
    243243            Parent()->SetFlags(flags);
    244244        }
    245245
    246         BPoint where = bounds.RightBottom() - BPoint(fBitmap->Bounds().Width(),
    247             fBitmap->Bounds().Height());
     246        BPoint where = bounds.RightBottom() - BPoint(8, 8);
     247
    248248        SetDrawingMode(B_OP_OVER);
    249         DrawBitmap(fBitmap, where);
     249
     250        SetHighColor(50,50,50,255);
     251        StrokeLine(BPoint(where.x + 7,where.y + 2), BPoint(where.x + 7,where.y + 7));
     252        StrokeLine(BPoint(where.x + 7,where.y + 7), BPoint(where.x + 6,where.y + 7));
     253        StrokeLine(BPoint(where.x + 6,where.y + 7), BPoint(where.x + 6,where.y + 2));
     254        StrokeLine(BPoint(where.x + 6,where.y + 2), BPoint(where.x + 4,where.y + 0));
     255        StrokeLine(BPoint(where.x + 4,where.y + 0), BPoint(where.x + 2,where.y + 0));
     256        StrokeLine(BPoint(where.x + 2,where.y + 0), BPoint(where.x + 2,where.y + 1));
     257        StrokeLine(BPoint(where.x + 2,where.y + 1), BPoint(where.x + 3,where.y + 2));
     258        StrokeLine(BPoint(where.x + 3,where.y + 2), BPoint(where.x + 3,where.y + 3));
     259        StrokeLine(BPoint(where.x + 3,where.y + 3), BPoint(where.x + 2,where.y + 3));
     260        StrokeLine(BPoint(where.x + 2,where.y + 3), BPoint(where.x + 1,where.y + 2));
     261        StrokeLine(BPoint(where.x + 1,where.y + 2), BPoint(where.x + 0,where.y + 2));
     262        StrokeLine(BPoint(where.x + 0,where.y + 2), BPoint(where.x + 0,where.y + 4));
     263        StrokeLine(BPoint(where.x + 0,where.y + 4), BPoint(where.x + 2,where.y + 6));
     264        StrokeLine(BPoint(where.x + 2,where.y + 6), BPoint(where.x + 5,where.y + 6));
     265        StrokeLine(BPoint(where.x + 5,where.y + 6), BPoint(where.x + 7,where.y + 2));
     266
     267        SetHighColor(240,50,50,255);
     268        StrokeLine(BPoint(where.x + 1,where.y + 4), BPoint(where.x + 2,where.y + 5));
     269        StrokeLine(BPoint(where.x + 2,where.y + 5), BPoint(where.x + 5,where.y + 5));
     270        StrokeLine(BPoint(where.x + 5,where.y + 5), BPoint(where.x + 5,where.y + 2));
     271        StrokeLine(BPoint(where.x + 5,where.y + 2), BPoint(where.x + 4,where.y + 1));
     272        StrokeLine(BPoint(where.x + 4,where.y + 1), BPoint(where.x + 3,where.y + 1));
     273        StrokeLine(BPoint(where.x + 3,where.y + 1), BPoint(where.x + 4,where.y + 2));
     274        StrokeLine(BPoint(where.x + 4,where.y + 2), BPoint(where.x + 4,where.y + 4));
     275        StrokeLine(BPoint(where.x + 4,where.y + 4), BPoint(where.x + 2,where.y + 4));
     276        StrokeLine(BPoint(where.x + 2,where.y + 4), BPoint(where.x + 1,where.y + 3));
     277        StrokeLine(BPoint(where.x + 1,where.y + 3), BPoint(where.x + 1,where.y + 4));
     278
    250279        SetDrawingMode(B_OP_COPY);
    251280
    252281        if (fIsZombie) {