Merge pull request #4184 from RaiKoHoff/Dev_Master

Fix rizone.soft bitmap
This commit is contained in:
Rainer Kottenhoff 2022-09-19 20:32:59 +02:00 committed by GitHub
commit 89a53e4ece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 16 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 104 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

View File

@ -21,7 +21,7 @@ constexpr unsigned char IndexFromChar(char ch) {
return static_cast<unsigned char>(ch);
}
}
}
CaseFolderTable::CaseFolderTable() noexcept : mapping{} {
StandardASCII();
@ -31,11 +31,11 @@ size_t CaseFolderTable::Fold(char *folded, size_t sizeFolded, const char *mixed,
if (lenMixed > sizeFolded) {
return 0;
}
for (size_t i=0; i<lenMixed; i++) {
for (size_t i=0; i<lenMixed; i++) {
folded[i] = mapping[IndexFromChar(mixed[i])];
}
return lenMixed;
}
return lenMixed;
}
void CaseFolderTable::SetTranslation(char ch, char chTranslation) noexcept {
mapping[IndexFromChar(ch)] = chTranslation;

View File

@ -1856,7 +1856,7 @@ void SurfaceD2D::FillRectangle(PRectangle rc, Surface &surfacePattern) {
if (SUCCEEDED(hr) && pBitmap) {
ID2D1BitmapBrush *pBitmapBrush = nullptr;
const D2D1_BITMAP_BRUSH_PROPERTIES brushProperties =
D2D1::BitmapBrushProperties(D2D1_EXTEND_MODE_WRAP, D2D1_EXTEND_MODE_WRAP,
D2D1::BitmapBrushProperties(D2D1_EXTEND_MODE_WRAP, D2D1_EXTEND_MODE_WRAP,
D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR);
// Create the bitmap brush.
hr = pRenderTarget->CreateBitmapBrush(pBitmap, brushProperties, &pBitmapBrush);
@ -1977,9 +1977,9 @@ void SurfaceD2D::DrawRGBAImage(PRectangle rc, int width, int height, const unsig
ID2D1Bitmap *bitmap = nullptr;
const D2D1_SIZE_U size = D2D1::SizeU(width, height);
D2D1_BITMAP_PROPERTIES props = {{DXGI_FORMAT_B8G8R8A8_UNORM,
D2D1_ALPHA_MODE_PREMULTIPLIED}, 72.0, 72.0};
D2D1_ALPHA_MODE_PREMULTIPLIED}, 72.0, 72.0};
const HRESULT hr = pRenderTarget->CreateBitmap(size, image.data(),
width * 4, &props, &bitmap);
width * 4, &props, &bitmap);
if (SUCCEEDED(hr)) {
const D2D1_RECT_F rcDestination = RectangleFromPRectangle(rc);
pRenderTarget->DrawBitmap(bitmap, rcDestination);
@ -3934,7 +3934,7 @@ LRESULT ListBoxX::WndProc(HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam
}
LRESULT PASCAL ListBoxX::StaticWndProc(
HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) {
HWND hWnd, UINT iMessage, WPARAM wParam, LPARAM lParam) {
if (iMessage == WM_CREATE) {
CREATESTRUCT *pCreate = reinterpret_cast<CREATESTRUCT *>(lParam);
SetWindowPointer(hWnd, pCreate->lpCreateParams);
@ -4072,9 +4072,9 @@ void Platform_Initialise(void *hInstance) noexcept {
void Platform_Finalise(bool fromDllMain) noexcept {
#if defined(USE_D2D)
if (!fromDllMain) {
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
ReleaseUnknown(gdiInterop);
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>>
ReleaseUnknown(gdiInterop);
// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<<
ReleaseUnknown(pIDWriteFactory);
ReleaseUnknown(pD2DFactory);
if (hDLLDWrite) {

View File

@ -742,9 +742,9 @@ void ScintillaWin::StartDrag() {
IDropSource *pDropSource = reinterpret_cast<IDropSource *>(&ds);
//Platform::DebugPrintf("About to DoDragDrop %x %x\n", pDataObject, pDropSource);
const HRESULT hr = ::DoDragDrop(
pDataObject,
pDropSource,
DROPEFFECT_COPY | DROPEFFECT_MOVE, &dwEffect);
pDataObject,
pDropSource,
DROPEFFECT_COPY | DROPEFFECT_MOVE, &dwEffect);
//Platform::DebugPrintf("DoDragDrop = %x\n", hr);
if (SUCCEEDED(hr)) {
if ((hr == DRAGDROP_S_DROP) && (dwEffect == DROPEFFECT_MOVE) && dropWentOutside) {
@ -3779,7 +3779,7 @@ sptr_t ScintillaWin::DirectFunction(
}
sptr_t ScintillaWin::DirectStatusFunction(
sptr_t ptr, UINT iMessage, uptr_t wParam, sptr_t lParam, int *pStatus) {
sptr_t ptr, UINT iMessage, uptr_t wParam, sptr_t lParam, int *pStatus) {
ScintillaWin *sci = reinterpret_cast<ScintillaWin *>(ptr);
PLATFORM_ASSERT(::GetCurrentThreadId() == ::GetWindowThreadProcessId(sci->MainHWND(), nullptr));
const sptr_t returnValue = sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);
@ -3790,7 +3790,7 @@ sptr_t ScintillaWin::DirectStatusFunction(
namespace Scintilla::Internal {
sptr_t DirectFunction(
ScintillaWin *sci, UINT iMessage, uptr_t wParam, sptr_t lParam) {
ScintillaWin *sci, UINT iMessage, uptr_t wParam, sptr_t lParam) {
return sci->WndProc(static_cast<Message>(iMessage), wParam, lParam);
}