[ wxwindows-Bugs-1530862 ] wxDC::DoDrawBitmap smears colors
SourceForge.net
noreply at sourceforge.net
Sat Jul 29 06:15:27 PDT 2006
Bugs item #1530862, was opened at 2006-07-29 15:15
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1530862&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxMSW specific
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: troelsk (troelsk)
Assigned to: Nobody/Anonymous (nobody)
Summary: wxDC::DoDrawBitmap smears colors
Initial Comment:
msw/wxDC::DoDrawBitmap smears colors when scaling.
How to reproduce:
1. Add scaling to
samples/image/image.cpp/MyImageFrame::OnPaint:
void OnPaint(wxPaintEvent& WXUNUSED(event))
{
wxPaintDC dc( this );
dc.SetUserScale(0.5, 0.5);
//::SetStretchBltMode((HDC)dc.GetHDC(),
COLORONCOLOR);
dc.DrawBitmap( m_bitmap, 0, 0, true /* use mask */ );
}
2. Build and run samles/image, press Ctrl+O, choose 24
bit jpeg photo. Colors are smeared.
3. Uncomment the SetStretchBltMode line (above), build,
run and open jpeg photo again. Colors are good.
Remedy:
Use the StretchBltModeChanger class in
src/msw/wxDC::DoDrawBitmap, just like
in src/msw/wxDC::DoBlit.
Using wxMSW 2.6.3 on Win2000.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1530862&group_id=9863
More information about the wx-dev
mailing list