acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
_gdiplus.h
1
// Created by camilo on 2023-06-28 19:20 <3ThomasBorregaardSorensen!!
2
#pragma once
3
4
5
#undef USUAL_OPERATING_SYSTEM_SUPPRESSIONS
6
#include "acme/_operating_system.h"
7
#include <gdiplus.h>
8
#include "acme/graphics/write_text/font_size.h"
9
10
11
constexpr
Gdiplus::REAL gdiplus_font_size(
const
write_text::font_size & fontsize)
12
{
13
14
return
(Gdiplus::REAL) (::f64) fontsize.as_f64();
15
16
}
17
18
constexpr
Gdiplus::Unit gdiplus_font_unit(
const
write_text::font_size & fontsize)
19
{
20
21
switch
(fontsize.eunit())
22
{
23
case
e_unit_pixel:
24
return
Gdiplus::UnitPixel;
25
case
e_unit_point:
26
return
Gdiplus::UnitPoint;
27
default
:
28
throw
fontsize.eunit();
29
}
30
31
}
operating_system
windows
_gdiplus.h
Generated by
1.17.0