xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
graphics_unit.h
Go to the documentation of this file.
1 #pragma once
5 #include <xtd/ustring.h>
6 
8 namespace xtd {
10  namespace drawing {
17  enum class graphics_unit {
19  world = 0,
21  display = 1,
23  pixel = 2,
25  point = 3,
27  inch = 4,
29  document = 5,
31  millimeter = 6
32  };
33 
35  inline std::ostream& operator<<(std::ostream& os, graphics_unit value) {return os << xtd::to_string(value, {{graphics_unit::world, "world"}, {graphics_unit::display, "display"}, {graphics_unit::pixel, "pixel"}, {graphics_unit::point, "point"}, {graphics_unit::inch, "inch"}, {graphics_unit::document, "document"}, {graphics_unit::millimeter, "millimeter"}});}
36  inline std::wostream& operator<<(std::wostream& os, graphics_unit value) {return os << xtd::to_string(value, {{graphics_unit::world, L"world"}, {graphics_unit::display, L"display"}, {graphics_unit::pixel, L"pixel"}, {graphics_unit::point, L"point"}, {graphics_unit::inch, L"inch"}, {graphics_unit::document, L"document"}, {graphics_unit::millimeter, L"millimeter"}});}
38  }
39 }
Represents an ordered pair of integer x- and y-coordinates that defines a point in a two-dimensional ...
Definition: point.h:48
std::string to_string(const value_t &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: to_string.h:37
graphics_unit
Specifies the unit of measure for the given data. This enumeration has a flags attribute that allows ...
Definition: graphics_unit.h:17
@ millimeter
Specifies the millimeter as the unit of measure.
@ point
Specifies a printer's point (1/72 inch) as the unit of measure.
@ inch
Specifies the inch as the unit of measure.
@ world
Specifies the world coordinate system unit as the unit of measure.
@ pixel
Specifies a device pixel as the unit of measure.
@ display
Specifies 1/75 inch as the unit of measure.
@ document
Specifies the document unit (1/300 inch) as the unit of measure.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::ustring class.