mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
31 lines
562 B
C++
31 lines
562 B
C++
#pragma once
|
|
|
|
#include <memory>
|
|
#include "DrawingBase.h"
|
|
|
|
namespace Drawing
|
|
{
|
|
// Represents a font used for text rendering
|
|
class Font
|
|
{
|
|
public:
|
|
Font() = default;
|
|
Font(HWND Handle, const HFONT hFont);
|
|
Font(HWND Handle, const Gdiplus::Font& FontObject);
|
|
|
|
virtual ~Font();
|
|
|
|
// Gets a handle to the native font
|
|
HFONT GetFontHandle();
|
|
// Returns a GDI+ font
|
|
std::unique_ptr<Gdiplus::Font> GetFont();
|
|
|
|
private:
|
|
// Internal handle
|
|
HWND _Handle;
|
|
// Internal native handle
|
|
HFONT _NativeFont;
|
|
// Internal cached state
|
|
bool _OwnsFont;
|
|
};
|
|
} |