acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
geometry2d.h
1
// Created by camilo on 2024-12-29 21:52 <3ThomasBorregaardSørensen!!
2
#pragma once
3
4
5
inline
winrt::Windows::Foundation::Rect as_winrt_windows_foundation_rect(const ::i32_rectangle & rectangle)
6
{
7
8
winrt::Windows::Foundation::Rect rect;
9
10
rect.X = (::f32) rectangle.left;
11
rect.Y = (::f32) rectangle.top;
12
rect.Width = (::f32) rectangle.width();
13
rect.Height = (::f32) rectangle.height();
14
15
return
rect;
16
17
}
18
19
20
inline ::i32_rectangle as_int_rectangle(const ::winrt::Windows::Foundation::Rect & rect)
21
{
22
23
::i32_rectangle rectangle;
24
25
rectangle.left = (::i32)rect.X;
26
rectangle.top = (::i32)rect.Y;
27
rectangle.right = (::i32)(rect.X + rect.Width);
28
rectangle.bottom = (::i32)(rect.Y + rect.Height);
29
30
return
rectangle;
31
32
}
33
34
35
operating_system
universal_windows
geometry2d.h
Generated by
1.17.0