VirtualBox

Changeset 30693 in vbox


Ignore:
Timestamp:
Jul 7, 2010 9:21:11 AM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4-OSX: use the new image tools

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/darwin/UICocoaSpecialControls.mm

    r30188 r30693  
    2121#include "UICocoaSpecialControls.h"
    2222#include "VBoxUtils-darwin.h"
     23#include "UIImageTools.h"
    2324#include <VBox/cdefs.h>
    2425
     
    228229    aRect.origin.y = (aToRect.size.height - aRect.size.height) / 2.0;
    229230    return aRect;
    230 }
    231 
    232 QImage toGray(const QImage& image)
    233 {
    234     QImage result = image.convertToFormat(QImage::Format_ARGB32);
    235     for (int i=0; i < result.height(); ++i)
    236     {
    237         QRgb *pScanLine = (QRgb *)result.scanLine(i);
    238         for (int j=0; j < result.width(); ++j)
    239         {
    240             const int g = qGray(pScanLine[j]);
    241             pScanLine[j] = qRgba(g, g, g, qAlpha(pScanLine[j]));
    242         }
    243     }
    244     return result;
    245231}
    246232
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette