More bitamp and image fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15230 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -661,12 +661,20 @@ bool wxBitmap::CreateFromImage (
|
|||||||
// Have to do something similar to WIN32's StretchDIBits, use GpiBitBlt
|
// Have to do something similar to WIN32's StretchDIBits, use GpiBitBlt
|
||||||
// in combination with setting the bits into the selected bitmap
|
// in combination with setting the bits into the selected bitmap
|
||||||
//
|
//
|
||||||
lScans = ::GpiSetBitmapBits( hPS
|
if ((lScans = ::GpiSetBitmapBits( hPS
|
||||||
,0 // Start at the bottom
|
,0 // Start at the bottom
|
||||||
,(LONG)nHeight // One line per scan
|
,(LONG)nHeight // One line per scan
|
||||||
,(PBYTE)pucBits
|
,(PBYTE)pucBits
|
||||||
,&vInfo
|
,&vInfo
|
||||||
);
|
)) == GPI_ALTERROR)
|
||||||
|
{
|
||||||
|
ERRORID vError;
|
||||||
|
wxString sError;
|
||||||
|
|
||||||
|
vError = ::WinGetLastError(vHabmain);
|
||||||
|
sError = wxPMErrorToStr(vError);
|
||||||
|
}
|
||||||
|
|
||||||
hPSScreen = ::GpiCreatePS( vHabmain
|
hPSScreen = ::GpiCreatePS( vHabmain
|
||||||
,hDCScreen
|
,hDCScreen
|
||||||
,&vSize
|
,&vSize
|
||||||
|
@@ -1043,12 +1043,49 @@ void wxDC::DoDrawRectangle(
|
|||||||
//
|
//
|
||||||
// Debug testing:
|
// Debug testing:
|
||||||
//
|
//
|
||||||
for (int i = 0; i < vHeight; i++)
|
if (m_vSelectedBitmap != wxNullBitmap)
|
||||||
{
|
{
|
||||||
for (int j = 0; j < vHeight; j++)
|
BITMAPINFOHEADER2 vHeader;
|
||||||
|
BITMAPINFO2 vInfo;
|
||||||
|
|
||||||
|
vHeader.cbFix = 16L;
|
||||||
|
if (::GpiQueryBitmapInfoHeader(m_hPS, &vHeader))
|
||||||
{
|
{
|
||||||
vPoint[0].x = j; vPoint[0].y = i;
|
int nBytesPerLine = vHeader.cBitCount/8;
|
||||||
lColor = ::GpiQueryPel(m_hPS, &vPoint[0]);
|
unsigned char* pucData = NULL;
|
||||||
|
unsigned char* pucBits;
|
||||||
|
LONG lScans = 0L;
|
||||||
|
|
||||||
|
vInfo.cbFix = 16;
|
||||||
|
vInfo.cx = vHeader.cx;
|
||||||
|
vInfo.cy = vHeader.cy;
|
||||||
|
vInfo.cPlanes = vHeader.cPlanes;
|
||||||
|
vInfo.cBitCount = vHeader.cBitCount;
|
||||||
|
pucData = (unsigned char*)malloc(nBytesPerLine * vHeight);
|
||||||
|
pucBits = pucData;
|
||||||
|
for (int i = 0; i < vHeight; i++)
|
||||||
|
{
|
||||||
|
if (i <= m_vSelectedBitmap.GetHeight())
|
||||||
|
{
|
||||||
|
for (int j = 0; j < vWidth; j++)
|
||||||
|
{
|
||||||
|
if (j <= m_vSelectedBitmap.GetWidth())
|
||||||
|
{
|
||||||
|
vPoint[0].x = j; vPoint[0].y = i;
|
||||||
|
lColor = ::GpiQueryPel(m_hPS, &vPoint[0]);
|
||||||
|
*(pucBits++) = lColor >> 24;
|
||||||
|
*(pucBits++) = lColor >> 16;
|
||||||
|
*(pucBits++) = lColor >> 8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
lScans = ::GpiSetBitmapBits( m_hPS
|
||||||
|
,0 // Start at the bottom
|
||||||
|
,(LONG)vHeight // One line per scan
|
||||||
|
,(PBYTE)pucData
|
||||||
|
,&vInfo
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -4,7 +4,7 @@ DATA MULTIPLE NONSHARED READWRITE LOADONCALL
|
|||||||
CODE LOADONCALL
|
CODE LOADONCALL
|
||||||
|
|
||||||
EXPORTS
|
EXPORTS
|
||||||
;From library: H:\DEV\WX2\WXWINDOWS\lib\wx.lib
|
;From library: F:\DEV\WX2\WXWINDOWS\LIB\wx.lib
|
||||||
;From object file: dummy.cpp
|
;From object file: dummy.cpp
|
||||||
;PUBDEFs (Symbols available from object file):
|
;PUBDEFs (Symbols available from object file):
|
||||||
wxDummyChar
|
wxDummyChar
|
||||||
@@ -1925,7 +1925,7 @@ EXPORTS
|
|||||||
wxEVT_NC_LEFT_DCLICK
|
wxEVT_NC_LEFT_DCLICK
|
||||||
wxEVT_INIT_DIALOG
|
wxEVT_INIT_DIALOG
|
||||||
wxEVT_COMMAND_SET_FOCUS
|
wxEVT_COMMAND_SET_FOCUS
|
||||||
;From object file: H:\DEV\WX2\WXWINDOWS\src\common\extended.c
|
;From object file: F:\DEV\WX2\WXWINDOWS\src\common\extended.c
|
||||||
;PUBDEFs (Symbols available from object file):
|
;PUBDEFs (Symbols available from object file):
|
||||||
ConvertToIeeeExtended
|
ConvertToIeeeExtended
|
||||||
ConvertFromIeeeExtended
|
ConvertFromIeeeExtended
|
||||||
@@ -5003,6 +5003,8 @@ EXPORTS
|
|||||||
Fit__7wxSizerFP8wxWindow
|
Fit__7wxSizerFP8wxWindow
|
||||||
;wxSizer::GetMinWindowSize(wxWindow*)
|
;wxSizer::GetMinWindowSize(wxWindow*)
|
||||||
GetMinWindowSize__7wxSizerFP8wxWindow
|
GetMinWindowSize__7wxSizerFP8wxWindow
|
||||||
|
;wxSizer::FitInside(wxWindow*)
|
||||||
|
FitInside__7wxSizerFP8wxWindow
|
||||||
;wxSizer::Prepend(wxWindow*,int,int,int,wxObject*)
|
;wxSizer::Prepend(wxWindow*,int,int,int,wxObject*)
|
||||||
Prepend__7wxSizerFP8wxWindowiN22P8wxObject
|
Prepend__7wxSizerFP8wxWindowiN22P8wxObject
|
||||||
__vft15wxFlexGridSizer8wxObject
|
__vft15wxFlexGridSizer8wxObject
|
||||||
@@ -5089,6 +5091,10 @@ EXPORTS
|
|||||||
DoSetItemMinSize__7wxSizerFP7wxSizeriT2
|
DoSetItemMinSize__7wxSizerFP7wxSizeriT2
|
||||||
;wxSizerItem::DeleteWindows()
|
;wxSizerItem::DeleteWindows()
|
||||||
DeleteWindows__11wxSizerItemFv
|
DeleteWindows__11wxSizerItemFv
|
||||||
|
;wxSizer::GetMinClientSize(wxWindow*)
|
||||||
|
GetMinClientSize__7wxSizerFP8wxWindow
|
||||||
|
;wxSizer::GetMaxClientSize(wxWindow*)
|
||||||
|
GetMaxClientSize__7wxSizerFP8wxWindow
|
||||||
;wxSizerItem::wxSizerItem(wxWindow*,int,int,int,wxObject*)
|
;wxSizerItem::wxSizerItem(wxWindow*,int,int,int,wxObject*)
|
||||||
__ct__11wxSizerItemFP8wxWindowiN22P8wxObject
|
__ct__11wxSizerItemFP8wxWindowiN22P8wxObject
|
||||||
__vft16wxStaticBoxSizer8wxObject
|
__vft16wxStaticBoxSizer8wxObject
|
||||||
@@ -5113,8 +5119,12 @@ EXPORTS
|
|||||||
SetItemBounds__11wxGridSizerFP11wxSizerItemiN32
|
SetItemBounds__11wxGridSizerFP11wxSizerItemiN32
|
||||||
;wxGridSizer::CalcMin()
|
;wxGridSizer::CalcMin()
|
||||||
CalcMin__11wxGridSizerFv
|
CalcMin__11wxGridSizerFv
|
||||||
|
;wxSizer::VirtualFitSize(wxWindow*)
|
||||||
|
VirtualFitSize__7wxSizerFP8wxWindow
|
||||||
;wxNotebookSizer::wxNotebookSizer(wxNotebook*)
|
;wxNotebookSizer::wxNotebookSizer(wxNotebook*)
|
||||||
__ct__15wxNotebookSizerFP10wxNotebook
|
__ct__15wxNotebookSizerFP10wxNotebook
|
||||||
|
;wxSizer::SetVirtualSizeHints(wxWindow*)
|
||||||
|
SetVirtualSizeHints__7wxSizerFP8wxWindow
|
||||||
;From object file: ..\common\socket.cpp
|
;From object file: ..\common\socket.cpp
|
||||||
;PUBDEFs (Symbols available from object file):
|
;PUBDEFs (Symbols available from object file):
|
||||||
;wxSocketBase::SetTimeout(long)
|
;wxSocketBase::SetTimeout(long)
|
||||||
@@ -6027,7 +6037,7 @@ EXPORTS
|
|||||||
Read32__17wxTextInputStreamFv
|
Read32__17wxTextInputStreamFv
|
||||||
;wxTextInputStream::SkipIfEndOfLine(char)
|
;wxTextInputStream::SkipIfEndOfLine(char)
|
||||||
SkipIfEndOfLine__17wxTextInputStreamFc
|
SkipIfEndOfLine__17wxTextInputStreamFc
|
||||||
;From object file: H:\DEV\WX2\WXWINDOWS\src\common\unzip.c
|
;From object file: F:\DEV\WX2\WXWINDOWS\src\common\unzip.c
|
||||||
;PUBDEFs (Symbols available from object file):
|
;PUBDEFs (Symbols available from object file):
|
||||||
unzReadCurrentFile
|
unzReadCurrentFile
|
||||||
unzGetCurrentFileInfo
|
unzGetCurrentFileInfo
|
||||||
@@ -6876,6 +6886,8 @@ EXPORTS
|
|||||||
ConvertPixelsToDialog__12wxWindowBaseFRC7wxPoint
|
ConvertPixelsToDialog__12wxWindowBaseFRC7wxPoint
|
||||||
;wxWindowBase::SetSizer(wxSizer*,unsigned long)
|
;wxWindowBase::SetSizer(wxSizer*,unsigned long)
|
||||||
SetSizer__12wxWindowBaseFP7wxSizerUl
|
SetSizer__12wxWindowBaseFP7wxSizerUl
|
||||||
|
;wxWindowBase::SetSizerAndFit(wxSizer*,unsigned long)
|
||||||
|
SetSizerAndFit__12wxWindowBaseFP7wxSizerUl
|
||||||
;wxWindowBase::FindWindow(long)
|
;wxWindowBase::FindWindow(long)
|
||||||
FindWindow__12wxWindowBaseFl
|
FindWindow__12wxWindowBaseFl
|
||||||
;wxWindowBase::IsExposed(int,int) const
|
;wxWindowBase::IsExposed(int,int) const
|
||||||
@@ -6885,6 +6897,8 @@ EXPORTS
|
|||||||
;wxWindowBase::sm_classwxWindowBase
|
;wxWindowBase::sm_classwxWindowBase
|
||||||
sm_classwxWindowBase__12wxWindowBase
|
sm_classwxWindowBase__12wxWindowBase
|
||||||
__vft16wxWindowListNode10wxNodeBase
|
__vft16wxWindowListNode10wxNodeBase
|
||||||
|
;wxWindowBase::SetVirtualSizeHints(int,int,int,int)
|
||||||
|
SetVirtualSizeHints__12wxWindowBaseFiN31
|
||||||
;wxWindowBase::SetSizeHints(int,int,int,int,int,int)
|
;wxWindowBase::SetSizeHints(int,int,int,int,int,int)
|
||||||
SetSizeHints__12wxWindowBaseFiN51
|
SetSizeHints__12wxWindowBaseFiN51
|
||||||
;wxWindowBase::MoveConstraint(int,int)
|
;wxWindowBase::MoveConstraint(int,int)
|
||||||
@@ -6921,6 +6935,8 @@ EXPORTS
|
|||||||
SetSizeConstraint__12wxWindowBaseFiN31
|
SetSizeConstraint__12wxWindowBaseFiN31
|
||||||
;wxWindowBase::GetClientSizeConstraint(int*,int*) const
|
;wxWindowBase::GetClientSizeConstraint(int*,int*) const
|
||||||
GetClientSizeConstraint__12wxWindowBaseCFPiT1
|
GetClientSizeConstraint__12wxWindowBaseCFPiT1
|
||||||
|
;wxWindowBase::DoSetVirtualSize(int,int)
|
||||||
|
DoSetVirtualSize__12wxWindowBaseFiT1
|
||||||
;wxWindowBase::DoHitTest(int,int) const
|
;wxWindowBase::DoHitTest(int,int) const
|
||||||
DoHitTest__12wxWindowBaseCFiT1
|
DoHitTest__12wxWindowBaseCFiT1
|
||||||
;wxWindowBase::DoGetBestSize() const
|
;wxWindowBase::DoGetBestSize() const
|
||||||
@@ -6961,6 +6977,8 @@ EXPORTS
|
|||||||
GetBorder__12wxWindowBaseCFv
|
GetBorder__12wxWindowBaseCFv
|
||||||
;wxWindowBase::Fit()
|
;wxWindowBase::Fit()
|
||||||
Fit__12wxWindowBaseFv
|
Fit__12wxWindowBaseFv
|
||||||
|
;wxWindowBase::DoGetVirtualSize() const
|
||||||
|
DoGetVirtualSize__12wxWindowBaseCFv
|
||||||
;wxWindowBase::DeleteRelatedConstraints()
|
;wxWindowBase::DeleteRelatedConstraints()
|
||||||
DeleteRelatedConstraints__12wxWindowBaseFv
|
DeleteRelatedConstraints__12wxWindowBaseFv
|
||||||
;wxWindowBase::SetHelpText(const wxString&)
|
;wxWindowBase::SetHelpText(const wxString&)
|
||||||
@@ -9858,6 +9876,8 @@ EXPORTS
|
|||||||
GetScrollPixelsPerUnit__14wxScrollHelperCFPiT1
|
GetScrollPixelsPerUnit__14wxScrollHelperCFPiT1
|
||||||
;wxScrollHelper::Scroll(int,int)
|
;wxScrollHelper::Scroll(int,int)
|
||||||
Scroll__14wxScrollHelperFiT1
|
Scroll__14wxScrollHelperFiT1
|
||||||
|
;wxGenericScrolledWindow::DoSetVirtualSize(int,int)
|
||||||
|
DoSetVirtualSize__23wxGenericScrolledWindowFiT1
|
||||||
;wxScrollHelper::~wxScrollHelper()
|
;wxScrollHelper::~wxScrollHelper()
|
||||||
__dt__14wxScrollHelperFv
|
__dt__14wxScrollHelperFv
|
||||||
;wxConstructorForwxGenericScrolledWindow()
|
;wxConstructorForwxGenericScrolledWindow()
|
||||||
@@ -9873,8 +9893,8 @@ EXPORTS
|
|||||||
HandleOnSize__14wxScrollHelperFR11wxSizeEvent
|
HandleOnSize__14wxScrollHelperFR11wxSizeEvent
|
||||||
;wxScrollHelper::HandleOnPaint(wxPaintEvent&)
|
;wxScrollHelper::HandleOnPaint(wxPaintEvent&)
|
||||||
HandleOnPaint__14wxScrollHelperFR12wxPaintEvent
|
HandleOnPaint__14wxScrollHelperFR12wxPaintEvent
|
||||||
;wxScrollHelper::GetVirtualSize(int*,int*) const
|
;wxScrollHelper::SetScrollRate(int,int)
|
||||||
GetVirtualSize__14wxScrollHelperCFPiT1
|
SetScrollRate__14wxScrollHelperFiT1
|
||||||
;wxScrollHelper::GetTargetWindow() const
|
;wxScrollHelper::GetTargetWindow() const
|
||||||
GetTargetWindow__14wxScrollHelperCFv
|
GetTargetWindow__14wxScrollHelperCFv
|
||||||
__vft14wxScrollHelper
|
__vft14wxScrollHelper
|
||||||
|
Reference in New Issue
Block a user