Changeset 141 for trunk


Ignore:
Timestamp:
16/01/08 07:37:35 (6 years ago)
Author:
guyru
Message:

use the built in wxImage::ConvertToGreyscale? instead of custom one

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wxDynamicBitmap.cpp

    r130 r141  
    8686} 
    8787 
     88/** 
     89 * This function repaints the widget with a grayscale version of the currently 
     90 * displayed picture, or repaints it with the original version depending on the 
     91 * value of grayscale. 
     92 * \param grayscale [bool] if true repaints the image with grayscale version,  
     93 * otherwise reverts to the original picture 
     94 */ 
    8895void wxDynamicBitmap::SetGrayScale(bool grayscale) 
    8996{ 
     
    94101                wxImage tempimage; 
    95102                tempimage = m_bitmap.ConvertToImage(); 
    96                 ConvertToGrayScale(tempimage); 
    97                 m_graybitmap = wxBitmap(tempimage); 
     103                //ConvertToGrayScale(tempimage); 
     104                m_graybitmap = wxBitmap(tempimage.ConvertToGreyscale()); 
    98105        } 
    99106        wxWindow::Refresh(); 
Note: See TracChangeset for help on using the changeset viewer.