diff options
Diffstat (limited to 'core/fxge/win32')
-rw-r--r-- | core/fxge/win32/dwrite_int.h | 2 | ||||
-rw-r--r-- | core/fxge/win32/fx_win32_device.cpp | 88 | ||||
-rw-r--r-- | core/fxge/win32/fx_win32_dib.cpp | 14 | ||||
-rw-r--r-- | core/fxge/win32/fx_win32_dwrite.cpp | 2 | ||||
-rw-r--r-- | core/fxge/win32/fx_win32_gdipext.cpp | 16 | ||||
-rw-r--r-- | core/fxge/win32/fx_win32_print.cpp | 26 | ||||
-rw-r--r-- | core/fxge/win32/win32_int.h | 70 |
7 files changed, 109 insertions, 109 deletions
diff --git a/core/fxge/win32/dwrite_int.h b/core/fxge/win32/dwrite_int.h index 62672b2387..60cc981a48 100644 --- a/core/fxge/win32/dwrite_int.h +++ b/core/fxge/win32/dwrite_int.h @@ -37,7 +37,7 @@ class CDWriteExt { FX_BOOL IsAvailable() { return m_pDWriteFactory != NULL; } void* DwCreateFontFaceFromStream(uint8_t* pData, - FX_DWORD size, + uint32_t size, int simulation_style); FX_BOOL DwCreateRenderingTarget(CFX_DIBitmap* pSrc, void** renderTarget); void DwDeleteRenderingTarget(void* renderTarget); diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp index 9b43fae09e..cb3f331d49 100644 --- a/core/fxge/win32/fx_win32_device.cpp +++ b/core/fxge/win32/fx_win32_device.cpp @@ -43,17 +43,17 @@ class CFX_Win32FontInfo final : public IFX_SystemFontInfo { const FX_CHAR* face, int& iExact) override; void* GetFont(const FX_CHAR* face) override { return NULL; } - FX_DWORD GetFontData(void* hFont, - FX_DWORD table, + uint32_t GetFontData(void* hFont, + uint32_t table, uint8_t* buffer, - FX_DWORD size) override; + uint32_t size) override; FX_BOOL GetFaceName(void* hFont, CFX_ByteString& name) override; FX_BOOL GetFontCharset(void* hFont, int& charset) override; void DeleteFont(void* hFont) override; FX_BOOL IsOpenTypeFromDiv(const LOGFONTA* plf); FX_BOOL IsSupportFontFormDiv(const LOGFONTA* plf); - void AddInstalledFont(const LOGFONTA* plf, FX_DWORD FontType); + void AddInstalledFont(const LOGFONTA* plf, uint32_t FontType); void GetGBPreference(CFX_ByteString& face, int weight, int picth_family); void GetJapanesePreference(CFX_ByteString& face, int weight, @@ -76,18 +76,18 @@ void CFX_Win32FontInfo::Release() { delete this; } #define TT_MAKE_TAG(x1, x2, x3, x4) \ - (((FX_DWORD)x1 << 24) | ((FX_DWORD)x2 << 16) | ((FX_DWORD)x3 << 8) | \ - (FX_DWORD)x4) + (((uint32_t)x1 << 24) | ((uint32_t)x2 << 16) | ((uint32_t)x3 << 8) | \ + (uint32_t)x4) FX_BOOL CFX_Win32FontInfo::IsOpenTypeFromDiv(const LOGFONTA* plf) { HFONT hFont = CreateFontIndirectA(plf); FX_BOOL ret = FALSE; - FX_DWORD font_size = GetFontData(hFont, 0, NULL, 0); - if (font_size != GDI_ERROR && font_size >= sizeof(FX_DWORD)) { - FX_DWORD lVersion = 0; - GetFontData(hFont, 0, (uint8_t*)(&lVersion), sizeof(FX_DWORD)); - lVersion = (((FX_DWORD)(uint8_t)(lVersion)) << 24) | - ((FX_DWORD)((uint8_t)(lVersion >> 8))) << 16 | - ((FX_DWORD)((uint8_t)(lVersion >> 16))) << 8 | + uint32_t font_size = GetFontData(hFont, 0, NULL, 0); + if (font_size != GDI_ERROR && font_size >= sizeof(uint32_t)) { + uint32_t lVersion = 0; + GetFontData(hFont, 0, (uint8_t*)(&lVersion), sizeof(uint32_t)); + lVersion = (((uint32_t)(uint8_t)(lVersion)) << 24) | + ((uint32_t)((uint8_t)(lVersion >> 8))) << 16 | + ((uint32_t)((uint8_t)(lVersion >> 16))) << 8 | ((uint8_t)(lVersion >> 24)); if (lVersion == TT_MAKE_TAG('O', 'T', 'T', 'O') || lVersion == 0x00010000 || lVersion == TT_MAKE_TAG('t', 't', 'c', 'f') || @@ -101,13 +101,13 @@ FX_BOOL CFX_Win32FontInfo::IsOpenTypeFromDiv(const LOGFONTA* plf) { FX_BOOL CFX_Win32FontInfo::IsSupportFontFormDiv(const LOGFONTA* plf) { HFONT hFont = CreateFontIndirectA(plf); FX_BOOL ret = FALSE; - FX_DWORD font_size = GetFontData(hFont, 0, NULL, 0); - if (font_size != GDI_ERROR && font_size >= sizeof(FX_DWORD)) { - FX_DWORD lVersion = 0; - GetFontData(hFont, 0, (uint8_t*)(&lVersion), sizeof(FX_DWORD)); - lVersion = (((FX_DWORD)(uint8_t)(lVersion)) << 24) | - ((FX_DWORD)((uint8_t)(lVersion >> 8))) << 16 | - ((FX_DWORD)((uint8_t)(lVersion >> 16))) << 8 | + uint32_t font_size = GetFontData(hFont, 0, NULL, 0); + if (font_size != GDI_ERROR && font_size >= sizeof(uint32_t)) { + uint32_t lVersion = 0; + GetFontData(hFont, 0, (uint8_t*)(&lVersion), sizeof(uint32_t)); + lVersion = (((uint32_t)(uint8_t)(lVersion)) << 24) | + ((uint32_t)((uint8_t)(lVersion >> 8))) << 16 | + ((uint32_t)((uint8_t)(lVersion >> 16))) << 8 | ((uint8_t)(lVersion >> 24)); if (lVersion == TT_MAKE_TAG('O', 'T', 'T', 'O') || lVersion == 0x00010000 || lVersion == TT_MAKE_TAG('t', 't', 'c', 'f') || @@ -122,7 +122,7 @@ FX_BOOL CFX_Win32FontInfo::IsSupportFontFormDiv(const LOGFONTA* plf) { return ret; } void CFX_Win32FontInfo::AddInstalledFont(const LOGFONTA* plf, - FX_DWORD FontType) { + uint32_t FontType) { CFX_ByteString name(plf->lfFaceName); if (name[0] == '@') { return; @@ -144,7 +144,7 @@ void CFX_Win32FontInfo::AddInstalledFont(const LOGFONTA* plf, } static int CALLBACK FontEnumProc(const LOGFONTA* plf, const TEXTMETRICA* lpntme, - FX_DWORD FontType, + uint32_t FontType, LPARAM lParam) { CFX_Win32FontInfo* pFontInfo = (CFX_Win32FontInfo*)lParam; if (pFontInfo->m_pMapper->GetFontEnumerator()) { @@ -406,10 +406,10 @@ void* CFX_Win32FontInfo::MapFont(int weight, void CFX_Win32FontInfo::DeleteFont(void* hFont) { ::DeleteObject(hFont); } -FX_DWORD CFX_Win32FontInfo::GetFontData(void* hFont, - FX_DWORD table, +uint32_t CFX_Win32FontInfo::GetFontData(void* hFont, + uint32_t table, uint8_t* buffer, - FX_DWORD size) { + uint32_t size) { HFONT hOldFont = (HFONT)::SelectObject(m_hDC, (HFONT)hFont); table = FXDWORD_GET_MSBFIRST(reinterpret_cast<uint8_t*>(&table)); size = ::GetFontData(m_hDC, table, 0, buffer, size); @@ -581,7 +581,7 @@ FX_BOOL CGdiDeviceDriver::GDI_StretchDIBits(const CFX_DIBitmap* pBitmap1, int dest_top, int dest_width, int dest_height, - FX_DWORD flags, + uint32_t flags, void* pIccTransform) { CFX_DIBitmap* pBitmap = (CFX_DIBitmap*)pBitmap1; if (!pBitmap || dest_width == 0 || dest_height == 0) { @@ -624,8 +624,8 @@ FX_BOOL CGdiDeviceDriver::GDI_StretchBitMask(const CFX_DIBitmap* pBitmap1, int dest_top, int dest_width, int dest_height, - FX_DWORD bitmap_color, - FX_DWORD flags, + uint32_t bitmap_color, + uint32_t flags, int alpha_flag, void* pIccTransform) { CFX_DIBitmap* pBitmap = (CFX_DIBitmap*)pBitmap1; @@ -637,7 +637,7 @@ FX_BOOL CGdiDeviceDriver::GDI_StretchBitMask(const CFX_DIBitmap* pBitmap1, int width = pBitmap->GetWidth(), height = pBitmap->GetHeight(); struct { BITMAPINFOHEADER bmiHeader; - FX_DWORD bmiColors[2]; + uint32_t bmiColors[2]; } bmi; FXSYS_memset(&bmi.bmiHeader, 0, sizeof(BITMAPINFOHEADER)); bmi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); @@ -691,7 +691,7 @@ FX_BOOL CGdiDeviceDriver::SetClipRgn(void* hRgn) { } static HPEN _CreatePen(const CFX_GraphStateData* pGraphState, const CFX_Matrix* pMatrix, - FX_DWORD argb) { + uint32_t argb) { FX_FLOAT width; FX_FLOAT scale = 1.f; if (pMatrix) @@ -703,7 +703,7 @@ static HPEN _CreatePen(const CFX_GraphStateData* pGraphState, } else { width = 1.0f; } - FX_DWORD PenStyle = PS_GEOMETRIC; + uint32_t PenStyle = PS_GEOMETRIC; if (width < 1) { width = 1; } @@ -741,9 +741,9 @@ static HPEN _CreatePen(const CFX_GraphStateData* pGraphState, lb.lbColor = rgb; lb.lbStyle = BS_SOLID; lb.lbHatch = 0; - FX_DWORD* pDash = NULL; + uint32_t* pDash = NULL; if (pGraphState->m_DashCount) { - pDash = FX_Alloc(FX_DWORD, pGraphState->m_DashCount); + pDash = FX_Alloc(uint32_t, pGraphState->m_DashCount); for (int i = 0; i < pGraphState->m_DashCount; i++) { pDash[i] = FXSYS_round( pMatrix ? pMatrix->TransformDistance(pGraphState->m_DashArray[i]) @@ -758,7 +758,7 @@ static HPEN _CreatePen(const CFX_GraphStateData* pGraphState, FX_Free(pDash); return hPen; } -static HBRUSH _CreateBrush(FX_DWORD argb) { +static HBRUSH _CreateBrush(uint32_t argb) { int a; FX_COLORREF rgb; ArgbDecode(argb, a, rgb); @@ -851,8 +851,8 @@ static FX_BOOL _MatrixNoScaled(const CFX_Matrix* pMatrix) { FX_BOOL CGdiDeviceDriver::DrawPath(const CFX_PathData* pPathData, const CFX_Matrix* pMatrix, const CFX_GraphStateData* pGraphState, - FX_DWORD fill_color, - FX_DWORD stroke_color, + uint32_t fill_color, + uint32_t stroke_color, int fill_mode, int alpha_flag, void* pIccTransform, @@ -961,7 +961,7 @@ FX_BOOL CGdiDeviceDriver::DrawPath(const CFX_PathData* pPathData, return TRUE; } FX_BOOL CGdiDeviceDriver::FillRect(const FX_RECT* pRect, - FX_DWORD fill_color, + uint32_t fill_color, int alpha_flag, void* pIccTransform, int blend_type) { @@ -1017,7 +1017,7 @@ FX_BOOL CGdiDeviceDriver::DrawCosmeticLine(FX_FLOAT x1, FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2, - FX_DWORD color, + uint32_t color, int alpha_flag, void* pIccTransform, int blend_type) { @@ -1098,7 +1098,7 @@ FX_BOOL CGdiDisplayDriver::GetDIBits(CFX_DIBitmap* pBitmap, return ret; } FX_BOOL CGdiDisplayDriver::SetDIBits(const CFX_DIBSource* pSource, - FX_DWORD color, + uint32_t color, const FX_RECT* pSrcRect, int left, int top, @@ -1152,7 +1152,7 @@ FX_BOOL CGdiDisplayDriver::SetDIBits(const CFX_DIBSource* pSource, return FALSE; } FX_BOOL CGdiDisplayDriver::UseFoxitStretchEngine(const CFX_DIBSource* pSource, - FX_DWORD color, + uint32_t color, int dest_left, int dest_top, int dest_width, @@ -1183,13 +1183,13 @@ FX_BOOL CGdiDisplayDriver::UseFoxitStretchEngine(const CFX_DIBSource* pSource, return ret; } FX_BOOL CGdiDisplayDriver::StretchDIBits(const CFX_DIBSource* pSource, - FX_DWORD color, + uint32_t color, int dest_left, int dest_top, int dest_width, int dest_height, const FX_RECT* pClipRect, - FX_DWORD flags, + uint32_t flags, int alpha_flag, void* pIccTransform, int blend_type) { @@ -1265,7 +1265,7 @@ int GetPSLevel(HDC hDC) { if (device_type != DT_RASPRINTER) { return 0; } - FX_DWORD esc = GET_PS_FEATURESETTING; + uint32_t esc = GET_PS_FEATURESETTING; if (ExtEscape(hDC, QUERYESCSUPPORT, sizeof esc, (char*)&esc, 0, NULL)) { int param = FEATURESETTING_PSLEVEL; if (ExtEscape(hDC, GET_PS_FEATURESETTING, sizeof(int), (char*)¶m, @@ -1282,7 +1282,7 @@ int GetPSLevel(HDC hDC) { return 0; } esc = PSIDENT_GDICENTRIC; - if (ExtEscape(hDC, POSTSCRIPT_IDENTIFY, sizeof(FX_DWORD), (char*)&esc, 0, + if (ExtEscape(hDC, POSTSCRIPT_IDENTIFY, sizeof(uint32_t), (char*)&esc, 0, NULL) <= 0) { return 2; } diff --git a/core/fxge/win32/fx_win32_dib.cpp b/core/fxge/win32/fx_win32_dib.cpp index cd48d07554..cc627dbab0 100644 --- a/core/fxge/win32/fx_win32_dib.cpp +++ b/core/fxge/win32/fx_win32_dib.cpp @@ -27,7 +27,7 @@ CFX_ByteString CFX_WindowsDIB::GetBitmapInfo(const CFX_DIBitmap* pBitmap) { pbmih->biPlanes = 1; pbmih->biWidth = pBitmap->GetWidth(); if (pBitmap->GetBPP() == 8) { - FX_DWORD* pPalette = (FX_DWORD*)(pbmih + 1); + uint32_t* pPalette = (uint32_t*)(pbmih + 1); if (pBitmap->GetPalette()) { for (int i = 0; i < 256; i++) { pPalette[i] = pBitmap->GetPalette()[i]; @@ -39,7 +39,7 @@ CFX_ByteString CFX_WindowsDIB::GetBitmapInfo(const CFX_DIBitmap* pBitmap) { } } if (pBitmap->GetBPP() == 1) { - FX_DWORD* pPalette = (FX_DWORD*)(pbmih + 1); + uint32_t* pPalette = (uint32_t*)(pbmih + 1); if (pBitmap->GetPalette()) { pPalette[0] = pBitmap->GetPalette()[0]; pPalette[1] = pBitmap->GetPalette()[1]; @@ -88,11 +88,11 @@ CFX_DIBitmap* _FX_WindowsDIB_LoadFromBuf(BITMAPINFO* pbmi, } if (pbmi->bmiHeader.biBitCount == 1) { for (int i = 0; i < 2; i++) { - pBitmap->SetPaletteEntry(i, ((FX_DWORD*)pbmi->bmiColors)[i] | 0xff000000); + pBitmap->SetPaletteEntry(i, ((uint32_t*)pbmi->bmiColors)[i] | 0xff000000); } } else if (pbmi->bmiHeader.biBitCount == 8) { for (int i = 0; i < 256; i++) { - pBitmap->SetPaletteEntry(i, ((FX_DWORD*)pbmi->bmiColors)[i] | 0xff000000); + pBitmap->SetPaletteEntry(i, ((uint32_t*)pbmi->bmiColors)[i] | 0xff000000); } } return pBitmap; @@ -182,8 +182,8 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadDIBitmap(WINDIB_Open_Args_ args) { } CFX_DIBitmap* CFX_WindowsDIB::LoadFromDDB(HDC hDC, HBITMAP hBitmap, - FX_DWORD* pPalette, - FX_DWORD palsize) { + uint32_t* pPalette, + uint32_t palsize) { FX_BOOL bCreatedDC = !hDC; if (bCreatedDC) { hDC = CreateCompatibleDC(NULL); @@ -201,7 +201,7 @@ CFX_DIBitmap* CFX_WindowsDIB::LoadFromDDB(HDC hDC, if (bmih.biBitCount == 1 || bmih.biBitCount == 8) { int size = sizeof(BITMAPINFOHEADER) + 8; if (bmih.biBitCount == 8) { - size += sizeof(FX_DWORD) * 254; + size += sizeof(uint32_t) * 254; } BITMAPINFO* pbmih = (BITMAPINFO*)FX_Alloc(uint8_t, size); pbmih->bmiHeader.biSize = sizeof(BITMAPINFOHEADER); diff --git a/core/fxge/win32/fx_win32_dwrite.cpp b/core/fxge/win32/fx_win32_dwrite.cpp index 972295c5cc..f95b5eb4a3 100644 --- a/core/fxge/win32/fx_win32_dwrite.cpp +++ b/core/fxge/win32/fx_win32_dwrite.cpp @@ -127,7 +127,7 @@ CDWriteExt::~CDWriteExt() { Unload(); } LPVOID CDWriteExt::DwCreateFontFaceFromStream(uint8_t* pData, - FX_DWORD size, + uint32_t size, int simulation_style) { IDWriteFactory* pDwFactory = (IDWriteFactory*)m_pDWriteFactory; IDWriteFontFile* pDwFontFile = NULL; diff --git a/core/fxge/win32/fx_win32_gdipext.cpp b/core/fxge/win32/fx_win32_gdipext.cpp index 2fdfa3a8c7..b9c2190041 100644 --- a/core/fxge/win32/fx_win32_gdipext.cpp +++ b/core/fxge/win32/fx_win32_gdipext.cpp @@ -437,9 +437,9 @@ typedef HANDLE(__stdcall* FuncType_GdiAddFontMemResourceEx)(PVOID pbFont, DWORD* pcFonts); typedef BOOL(__stdcall* FuncType_GdiRemoveFontMemResourceEx)(HANDLE handle); void* CGdiplusExt::GdiAddFontMemResourceEx(void* pFontdata, - FX_DWORD size, + uint32_t size, void* pdv, - FX_DWORD* num_face) { + uint32_t* num_face) { if (m_pGdiAddFontMemResourceEx) { return ((FuncType_GdiAddFontMemResourceEx)m_pGdiAddFontMemResourceEx)( (PVOID)pFontdata, (DWORD)size, (PVOID)pdv, (DWORD*)num_face); @@ -711,7 +711,7 @@ void CGdiplusExt::Load() { GetProcAddress(m_GdiModule, "RemoveFontMemResourceEx"); } CGdiplusExt::~CGdiplusExt() {} -LPVOID CGdiplusExt::LoadMemFont(LPBYTE pData, FX_DWORD size) { +LPVOID CGdiplusExt::LoadMemFont(LPBYTE pData, uint32_t size) { GpFontCollection* pCollection = NULL; CGdiplusExt& GdiplusExt = ((CWin32Platform*)CFX_GEModule::Get()->GetPlatformData())->m_GdiplusExt; @@ -809,7 +809,7 @@ void CGdiplusExt::GdipSetTextRenderingHint(void* graphics, int mode) { CallFunc(GdipSetTextRenderingHint)((GpGraphics*)graphics, (TextRenderingHint)mode); } -void CGdiplusExt::GdipSetPageUnit(void* graphics, FX_DWORD unit) { +void CGdiplusExt::GdipSetPageUnit(void* graphics, uint32_t unit) { CGdiplusExt& GdiplusExt = ((CWin32Platform*)CFX_GEModule::Get()->GetPlatformData())->m_GdiplusExt; CallFunc(GdipSetPageUnit)((GpGraphics*)graphics, (GpUnit)unit); @@ -833,7 +833,7 @@ FX_BOOL CGdiplusExt::GdipDrawDriverString(void* graphics, } return FALSE; } -void CGdiplusExt::GdipCreateBrush(FX_DWORD fill_argb, void** pBrush) { +void CGdiplusExt::GdipCreateBrush(uint32_t fill_argb, void** pBrush) { CGdiplusExt& GdiplusExt = ((CWin32Platform*)CFX_GEModule::Get()->GetPlatformData())->m_GdiplusExt; CallFunc(GdipCreateSolidFill)((ARGB)fill_argb, (GpSolidFill**)pBrush); @@ -916,7 +916,7 @@ FX_BOOL CGdiplusExt::StretchBitMask(HDC hDC, int dest_top, int dest_width, int dest_height, - FX_DWORD argb, + uint32_t argb, const FX_RECT* pClipRect, int flags) { ASSERT(pBitmap->GetBPP() == 1); @@ -1100,8 +1100,8 @@ FX_BOOL CGdiplusExt::DrawPath(HDC hDC, const CFX_PathData* pPathData, const CFX_Matrix* pObject2Device, const CFX_GraphStateData* pGraphState, - FX_DWORD fill_argb, - FX_DWORD stroke_argb, + uint32_t fill_argb, + uint32_t stroke_argb, int fill_mode) { int nPoints = pPathData->GetPointCount(); if (nPoints == 0) { diff --git a/core/fxge/win32/fx_win32_print.cpp b/core/fxge/win32/fx_win32_print.cpp index f7a1bb69a0..cb5ce771a3 100644 --- a/core/fxge/win32/fx_win32_print.cpp +++ b/core/fxge/win32/fx_win32_print.cpp @@ -34,7 +34,7 @@ int CGdiPrinterDriver::GetDeviceCaps(int caps_id) { return CGdiDeviceDriver::GetDeviceCaps(caps_id); } FX_BOOL CGdiPrinterDriver::SetDIBits(const CFX_DIBSource* pSource, - FX_DWORD color, + uint32_t color, const FX_RECT* pSrcRect, int left, int top, @@ -62,13 +62,13 @@ FX_BOOL CGdiPrinterDriver::SetDIBits(const CFX_DIBSource* pSource, return GDI_SetDIBits(pBitmap, pSrcRect, left, top, pIccTransform); } FX_BOOL CGdiPrinterDriver::StretchDIBits(const CFX_DIBSource* pSource, - FX_DWORD color, + uint32_t color, int dest_left, int dest_top, int dest_width, int dest_height, const FX_RECT* pClipRect, - FX_DWORD flags, + uint32_t flags, int alpha_flag, void* pIccTransform, int blend_type) { @@ -147,7 +147,7 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, } int src_width = pSrcBitmap->GetWidth(), src_height = pSrcBitmap->GetHeight(); uint8_t* src_buf = pSrcBitmap->GetBuffer(); - FX_DWORD src_pitch = pSrcBitmap->GetPitch(); + uint32_t src_pitch = pSrcBitmap->GetPitch(); FX_FLOAT dest_area = pDestMatrix->GetUnitArea(); FX_FLOAT area_scale = ((FX_FLOAT)(src_width * src_height)) / dest_area; FX_FLOAT size_scale = FXSYS_sqrt(area_scale); @@ -222,9 +222,9 @@ static CFX_DIBitmap* Transform1bppBitmap(const CFX_DIBSource* pSrc, } FX_BOOL CGdiPrinterDriver::StartDIBits(const CFX_DIBSource* pSource, int bitmap_alpha, - FX_DWORD color, + uint32_t color, const CFX_Matrix* pMatrix, - FX_DWORD render_flags, + uint32_t render_flags, void*& handle, int alpha_flag, void* pIccTransform, @@ -330,7 +330,7 @@ FX_BOOL CPSPrinterDriver::Init(HDC hDC, int pslevel, FX_BOOL bCmykOutput) { if (ret) { CFX_PathData path; path.AllocPointCount(pData->rdh.nCount * 5); - for (FX_DWORD i = 0; i < pData->rdh.nCount; i++) { + for (uint32_t i = 0; i < pData->rdh.nCount; i++) { RECT* pRect = (RECT*)(pData->Buffer + pData->rdh.nRgnSize * i); path.AppendRect((FX_FLOAT)pRect->left, (FX_FLOAT)pRect->bottom, (FX_FLOAT)pRect->right, (FX_FLOAT)pRect->top); @@ -408,7 +408,7 @@ FX_BOOL CPSPrinterDriver::GetClipBox(FX_RECT* pRect) { return TRUE; } FX_BOOL CPSPrinterDriver::SetDIBits(const CFX_DIBSource* pBitmap, - FX_DWORD color, + uint32_t color, const FX_RECT* pSrcRect, int left, int top, @@ -422,13 +422,13 @@ FX_BOOL CPSPrinterDriver::SetDIBits(const CFX_DIBSource* pBitmap, pIccTransform); } FX_BOOL CPSPrinterDriver::StretchDIBits(const CFX_DIBSource* pBitmap, - FX_DWORD color, + uint32_t color, int dest_left, int dest_top, int dest_width, int dest_height, const FX_RECT* pClipRect, - FX_DWORD flags, + uint32_t flags, int alpha_flag, void* pIccTransform, int blend_type) { @@ -441,9 +441,9 @@ FX_BOOL CPSPrinterDriver::StretchDIBits(const CFX_DIBSource* pBitmap, } FX_BOOL CPSPrinterDriver::StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, - FX_DWORD color, + uint32_t color, const CFX_Matrix* pMatrix, - FX_DWORD render_flags, + uint32_t render_flags, void*& handle, int alpha_flag, void* pIccTransform, @@ -464,7 +464,7 @@ FX_BOOL CPSPrinterDriver::DrawDeviceText(int nChars, CFX_FontCache* pCache, const CFX_Matrix* pObject2Device, FX_FLOAT font_size, - FX_DWORD color, + uint32_t color, int alpha_flag, void* pIccTransform) { return m_PSRenderer.DrawText(nChars, pCharPos, pFont, pCache, pObject2Device, diff --git a/core/fxge/win32/win32_int.h b/core/fxge/win32/win32_int.h index d903d3abf5..18996afc5c 100644 --- a/core/fxge/win32/win32_int.h +++ b/core/fxge/win32/win32_int.h @@ -24,7 +24,7 @@ class CGdiplusExt { int dest_top, int dest_width, int dest_height, - FX_DWORD argb, + uint32_t argb, const FX_RECT* pClipRect, int flags); FX_BOOL StretchDIBits(HDC hDC, @@ -39,16 +39,16 @@ class CGdiplusExt { const CFX_PathData* pPathData, const CFX_Matrix* pObject2Device, const CFX_GraphStateData* pGraphState, - FX_DWORD fill_argb, - FX_DWORD stroke_argb, + uint32_t fill_argb, + uint32_t stroke_argb, int fill_mode); - void* LoadMemFont(uint8_t* pData, FX_DWORD size); + void* LoadMemFont(uint8_t* pData, uint32_t size); void DeleteMemFont(void* pFontCollection); FX_BOOL GdipCreateFromImage(void* bitmap, void** graphics); void GdipDeleteGraphics(void* graphics); void GdipSetTextRenderingHint(void* graphics, int mode); - void GdipSetPageUnit(void* graphics, FX_DWORD unit); + void GdipSetPageUnit(void* graphics, uint32_t unit); void GdipSetWorldTransform(void* graphics, void* pMatrix); FX_BOOL GdipDrawDriverString(void* graphics, unsigned short* text, @@ -58,7 +58,7 @@ class CGdiplusExt { void* positions, int flags, const void* matrix); - void GdipCreateBrush(FX_DWORD fill_argb, void** pBrush); + void GdipCreateBrush(uint32_t fill_argb, void** pBrush); void GdipDeleteBrush(void* pBrush); void GdipCreateMatrix(FX_FLOAT a, FX_FLOAT b, @@ -85,9 +85,9 @@ class CGdiplusExt { void GdipDisposeImage(void* bitmap); void GdipGetFontSize(void* pFont, FX_FLOAT* size); void* GdiAddFontMemResourceEx(void* pFontdata, - FX_DWORD size, + uint32_t size, void* pdv, - FX_DWORD* num_face); + uint32_t* num_face); FX_BOOL GdiRemoveFontMemResourceEx(void* handle); void* m_Functions[100]; void* m_pGdiAddFontMemResourceEx; @@ -125,14 +125,14 @@ class CGdiDeviceDriver : public IFX_RenderDeviceDriver { FX_BOOL DrawPath(const CFX_PathData* pPathData, const CFX_Matrix* pObject2Device, const CFX_GraphStateData* pGraphState, - FX_DWORD fill_color, - FX_DWORD stroke_color, + uint32_t fill_color, + uint32_t stroke_color, int fill_mode, int alpha_flag, void* pIccTransform, int blend_type) override; FX_BOOL FillRect(const FX_RECT* pRect, - FX_DWORD fill_color, + uint32_t fill_color, int alpha_flag, void* pIccTransform, int blend_type) override; @@ -140,7 +140,7 @@ class CGdiDeviceDriver : public IFX_RenderDeviceDriver { FX_FLOAT y1, FX_FLOAT x2, FX_FLOAT y2, - FX_DWORD color, + uint32_t color, int alpha_flag, void* pIccTransform, int blend_type) override; @@ -162,15 +162,15 @@ class CGdiDeviceDriver : public IFX_RenderDeviceDriver { int dest_top, int dest_width, int dest_height, - FX_DWORD flags, + uint32_t flags, void* pIccTransform); FX_BOOL GDI_StretchBitMask(const CFX_DIBitmap* pBitmap, int dest_left, int dest_top, int dest_width, int dest_height, - FX_DWORD bitmap_color, - FX_DWORD flags, + uint32_t bitmap_color, + uint32_t flags, int alpha_flag, void* pIccTransform); HDC m_hDC; @@ -191,7 +191,7 @@ class CGdiDisplayDriver : public CGdiDeviceDriver { void* pIccTransform = NULL, FX_BOOL bDEdge = FALSE) override; FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, - FX_DWORD color, + uint32_t color, const FX_RECT* pSrcRect, int left, int top, @@ -199,21 +199,21 @@ class CGdiDisplayDriver : public CGdiDeviceDriver { int alpha_flag, void* pIccTransform) override; FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, - FX_DWORD color, + uint32_t color, int dest_left, int dest_top, int dest_width, int dest_height, const FX_RECT* pClipRect, - FX_DWORD flags, + uint32_t flags, int alpha_flag, void* pIccTransform, int blend_type) override; FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, - FX_DWORD color, + uint32_t color, const CFX_Matrix* pMatrix, - FX_DWORD render_flags, + uint32_t render_flags, void*& handle, int alpha_flag, void* pIccTransform, @@ -221,7 +221,7 @@ class CGdiDisplayDriver : public CGdiDeviceDriver { return FALSE; } FX_BOOL UseFoxitStretchEngine(const CFX_DIBSource* pSource, - FX_DWORD color, + uint32_t color, int dest_left, int dest_top, int dest_width, @@ -239,7 +239,7 @@ class CGdiPrinterDriver : public CGdiDeviceDriver { protected: int GetDeviceCaps(int caps_id) override; FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, - FX_DWORD color, + uint32_t color, const FX_RECT* pSrcRect, int left, int top, @@ -247,21 +247,21 @@ class CGdiPrinterDriver : public CGdiDeviceDriver { int alpha_flag, void* pIccTransform) override; FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, - FX_DWORD color, + uint32_t color, int dest_left, int dest_top, int dest_width, int dest_height, const FX_RECT* pClipRect, - FX_DWORD flags, + uint32_t flags, int alpha_flag, void* pIccTransform, int blend_type) override; FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, - FX_DWORD color, + uint32_t color, const CFX_Matrix* pMatrix, - FX_DWORD render_flags, + uint32_t render_flags, void*& handle, int alpha_flag, void* pIccTransform, @@ -308,15 +308,15 @@ class CPSPrinterDriver : public IFX_RenderDeviceDriver { FX_BOOL DrawPath(const CFX_PathData* pPathData, const CFX_Matrix* pObject2Device, const CFX_GraphStateData* pGraphState, - FX_DWORD fill_color, - FX_DWORD stroke_color, + uint32_t fill_color, + uint32_t stroke_color, int fill_mode, int alpha_flag, void* pIccTransform, int blend_type) override; FX_BOOL GetClipBox(FX_RECT* pRect) override; FX_BOOL SetDIBits(const CFX_DIBSource* pBitmap, - FX_DWORD color, + uint32_t color, const FX_RECT* pSrcRect, int left, int top, @@ -324,21 +324,21 @@ class CPSPrinterDriver : public IFX_RenderDeviceDriver { int alpha_flag, void* pIccTransform) override; FX_BOOL StretchDIBits(const CFX_DIBSource* pBitmap, - FX_DWORD color, + uint32_t color, int dest_left, int dest_top, int dest_width, int dest_height, const FX_RECT* pClipRect, - FX_DWORD flags, + uint32_t flags, int alpha_flag, void* pIccTransform, int blend_type) override; FX_BOOL StartDIBits(const CFX_DIBSource* pBitmap, int bitmap_alpha, - FX_DWORD color, + uint32_t color, const CFX_Matrix* pMatrix, - FX_DWORD render_flags, + uint32_t render_flags, void*& handle, int alpha_flag, void* pIccTransform, @@ -349,7 +349,7 @@ class CPSPrinterDriver : public IFX_RenderDeviceDriver { CFX_FontCache* pCache, const CFX_Matrix* pObject2Device, FX_FLOAT font_size, - FX_DWORD color, + uint32_t color, int alpha_flag, void* pIccTransform) override; void* GetPlatformSurface() const override { return (void*)m_hDC; } @@ -362,7 +362,7 @@ class CPSPrinterDriver : public IFX_RenderDeviceDriver { CFX_PSRenderer m_PSRenderer; }; void _Color2Argb(FX_ARGB& argb, - FX_DWORD color, + uint32_t color, int alpha_flag, void* pIccTransform); |