mirror of
https://github.com/chibicitiberiu/rainmeter-studio.git
synced 2024-02-24 04:33:31 +00:00
Gfx: Change to use D2D 1.1
This commit is contained in:
parent
12dcf4628a
commit
44300e2f41
@ -44,8 +44,8 @@ D2D1_RECT_F ToRectF(const Gdiplus::RectF& rect)
|
|||||||
namespace Gfx {
|
namespace Gfx {
|
||||||
|
|
||||||
UINT CanvasD2D::c_Instances = 0;
|
UINT CanvasD2D::c_Instances = 0;
|
||||||
Microsoft::WRL::ComPtr<ID2D1Factory> CanvasD2D::c_D2DFactory;
|
Microsoft::WRL::ComPtr<ID2D1Factory1> CanvasD2D::c_D2DFactory;
|
||||||
Microsoft::WRL::ComPtr<IDWriteFactory> CanvasD2D::c_DWFactory;
|
Microsoft::WRL::ComPtr<IDWriteFactory1> CanvasD2D::c_DWFactory;
|
||||||
Microsoft::WRL::ComPtr<IDWriteGdiInterop> CanvasD2D::c_DWGDIInterop;
|
Microsoft::WRL::ComPtr<IDWriteGdiInterop> CanvasD2D::c_DWGDIInterop;
|
||||||
Microsoft::WRL::ComPtr<IWICImagingFactory> CanvasD2D::c_WICFactory;
|
Microsoft::WRL::ComPtr<IWICImagingFactory> CanvasD2D::c_WICFactory;
|
||||||
|
|
||||||
@ -110,8 +110,11 @@ void CanvasD2D::Finalize()
|
|||||||
c_WICFactory.Reset();
|
c_WICFactory.Reset();
|
||||||
c_DWGDIInterop.Reset();
|
c_DWGDIInterop.Reset();
|
||||||
|
|
||||||
c_DWFactory->UnregisterFontCollectionLoader(Util::DWriteFontCollectionLoader::GetInstance());
|
if (c_DWFactory)
|
||||||
c_DWFactory.Reset();
|
{
|
||||||
|
c_DWFactory->UnregisterFontCollectionLoader(Util::DWriteFontCollectionLoader::GetInstance());
|
||||||
|
c_DWFactory.Reset();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <GdiPlus.h>
|
#include <GdiPlus.h>
|
||||||
#include <d2d1.h>
|
#include <d2d1_1.h>
|
||||||
#include <d2d1helper.h>
|
#include <d2d1helper.h>
|
||||||
#include <dwrite_1.h>
|
#include <dwrite_1.h>
|
||||||
#include <wincodec.h>
|
#include <wincodec.h>
|
||||||
@ -99,8 +99,8 @@ private:
|
|||||||
bool m_TextAntiAliasing;
|
bool m_TextAntiAliasing;
|
||||||
|
|
||||||
static UINT c_Instances;
|
static UINT c_Instances;
|
||||||
static Microsoft::WRL::ComPtr<ID2D1Factory> c_D2DFactory;
|
static Microsoft::WRL::ComPtr<ID2D1Factory1> c_D2DFactory;
|
||||||
static Microsoft::WRL::ComPtr<IDWriteFactory> c_DWFactory;
|
static Microsoft::WRL::ComPtr<IDWriteFactory1> c_DWFactory;
|
||||||
static Microsoft::WRL::ComPtr<IDWriteGdiInterop> c_DWGDIInterop;
|
static Microsoft::WRL::ComPtr<IDWriteGdiInterop> c_DWGDIInterop;
|
||||||
static Microsoft::WRL::ComPtr<IWICImagingFactory> c_WICFactory;
|
static Microsoft::WRL::ComPtr<IWICImagingFactory> c_WICFactory;
|
||||||
};
|
};
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include "FontCollection.h"
|
#include "FontCollection.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <dwrite.h>
|
#include <dwrite_1.h>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx {
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include "TextFormat.h"
|
#include "TextFormat.h"
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <dwrite.h>
|
#include <dwrite_1.h>
|
||||||
#include <wrl/client.h>
|
#include <wrl/client.h>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef RM_GFX_UTIL_DWRITEFONTCOLLECTIONLOADER_H_
|
#ifndef RM_GFX_UTIL_DWRITEFONTCOLLECTIONLOADER_H_
|
||||||
#define RM_GFX_UTIL_DWRITEFONTCOLLECTIONLOADER_H_
|
#define RM_GFX_UTIL_DWRITEFONTCOLLECTIONLOADER_H_
|
||||||
|
|
||||||
#include <dwrite.h>
|
#include <dwrite_1.h>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx {
|
||||||
namespace Util {
|
namespace Util {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#define RM_GFX_UTIL_DWRITEFONTFILEENUMERATOR_H_
|
#define RM_GFX_UTIL_DWRITEFONTFILEENUMERATOR_H_
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <dwrite.h>
|
#include <dwrite_1.h>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx {
|
||||||
namespace Util {
|
namespace Util {
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
#ifndef RM_GFX_UTIL_DWRITEHELPERS_H_
|
#ifndef RM_GFX_UTIL_DWRITEHELPERS_H_
|
||||||
#define RM_GFX_UTIL_DWRITEHELPERS_H_
|
#define RM_GFX_UTIL_DWRITEHELPERS_H_
|
||||||
|
|
||||||
#include <dwrite.h>
|
#include <dwrite_1.h>
|
||||||
|
|
||||||
namespace Gfx {
|
namespace Gfx {
|
||||||
namespace Util {
|
namespace Util {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user