Changeset 30693 in vbox
- Timestamp:
- Jul 7, 2010 9:21:11 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/darwin/UICocoaSpecialControls.mm
r30188 r30693 21 21 #include "UICocoaSpecialControls.h" 22 22 #include "VBoxUtils-darwin.h" 23 #include "UIImageTools.h" 23 24 #include <VBox/cdefs.h> 24 25 … … 228 229 aRect.origin.y = (aToRect.size.height - aRect.size.height) / 2.0; 229 230 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;245 231 } 246 232
Note:
See TracChangeset
for help on using the changeset viewer.