xtd 0.2.0
Loading...
Searching...
No Matches
font.h
1#pragma once
3#if !defined(__XTD_DRAWING_NATIVE_LIBRARY__)
4#error "Do not include this file: Internal use only"
5#endif
7
8#include <cstdint>
9#include <vector>
10#include <xtd/static.h>
11#include <xtd/string.h>
12#include <xtd/drawing_native_export.h>
13
15namespace xtd {
17 namespace drawing {
19 class font;
21
24 namespace native {
32 class drawing_native_export_ font final static_ {
33 friend xtd::drawing::font;
34 protected:
36
49 static intptr create(const xtd::string& family_name, float em_size, bool bold, bool italic, bool underline, bool strikeout, xtd::byte gdi_char_set, bool gdi_vertical_font);
50
56
62
66 static void destroy(intptr font);
67
71 static int32 dpi();
72
106 static void get_information(intptr font, xtd::string& name, float& em_size, bool& bold, bool& italic, bool& underline, bool& strikeout, xtd::byte& gdi_char_set, bool& gdi_vertical_font);
107
112 static float height(intptr font);
113
119 static float height(intptr font, intptr hdc);
121 };
122 }
123 }
124}
Represents text as a sequence of character units.
Definition basic_string.h:79
Defines a particular format for text, including font face, size, and style attributes....
Definition font.h:45
Contains font native API.
Definition font.h:32
static float height(intptr font, intptr hdc)
Gets the font height for the specified hdc.
static intptr create(const xtd::string &family_name, float em_size, bool bold, bool italic, bool underline, bool strikeout, xtd::byte gdi_char_set, bool gdi_vertical_font)
Creates font.
static void destroy(intptr font)
Destroys the font.
static intptr create_from_hdc(intptr hdc)
Creates font from hdc.
static int32 dpi()
Gets the screen dpi .
static intptr create_from_hfont(intptr hfont)
Creates font from hfont.
static void get_information(intptr font, xtd::string &name, float &em_size, bool &bold, bool &italic, bool &underline, bool &strikeout, xtd::byte &gdi_char_set, bool &gdi_vertical_font)
Gets the font information from font hanfle.
static float height(intptr font)
Gets the font height.
#define static_
This keyword is use to represent a static object. A static object can't be instantiated (constructors...
Definition static.h:37
int32_t int32
Represents a 32-bit signed integer.
Definition int32.h:23
intmax_t intptr
Represent a pointer or a handle.
Definition intptr.h:23
uint8_t byte
Represents a 8-bit unsigned integer.
Definition byte.h:23
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Contains xtd::static_object class.
Contains xtd::string alias.