OSDN Git Service

フォーラム[#56172] SlimDX(改)のフォルダ内容が不完全だったので再UP。
[dtxmania/dtxmania.git] / SlimDXc_Jun2010(VC++2008) / source / directwrite / TextMetrics.h
1 /*\r
2 * Copyright (c) 2007-2009 SlimDX Group\r
3\r
4 * Permission is hereby granted, free of charge, to any person obtaining a copy\r
5 * of this software and associated documentation files (the "Software"), to deal\r
6 * in the Software without restriction, including without limitation the rights\r
7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r
8 * copies of the Software, and to permit persons to whom the Software is\r
9 * furnished to do so, subject to the following conditions:\r
10\r
11 * The above copyright notice and this permission notice shall be included in\r
12 * all copies or substantial portions of the Software.\r
13\r
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r
17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r
19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\r
20 * THE SOFTWARE.\r
21 */\r
22 #pragma once\r
23 \r
24 namespace SlimDX\r
25 {\r
26         namespace DirectWrite\r
27         {\r
28                 /// <summary>\r
29                 /// Contains the metrics associated with text after layout. All coordinates are in device independent pixels (DIPs).\r
30                 /// </summary>\r
31                 public value class TextMetrics\r
32                 {\r
33                 public:\r
34                         TextMetrics ( float left, float top, float width, float widthIncludingTrailingWhitespace,\r
35                                 float height, float layoutWidth, float layoutHeight, int maximumBidiReorderingDepth, int lineCount )\r
36                         {\r
37                                 Left = left;\r
38                                 Top = top;\r
39                                 Width = width;\r
40                                 WidthIncludingTrailingWhitespace = widthIncludingTrailingWhitespace;\r
41                                 Height = height;\r
42                                 LayoutWidth = layoutWidth;\r
43                                 LayoutHeight = layoutHeight;\r
44                                 MaximumBidiReorderingDepth = maximumBidiReorderingDepth;\r
45                                 LineCount = lineCount;\r
46                         }\r
47 \r
48                         /// <summary>\r
49                         /// A value that indicates the left-most point of formatted text\r
50                         /// relative to the layout box, while excluding any glyph overhang.\r
51                         /// </summary>\r
52                         property float Left;\r
53 \r
54                         /// <summary>\r
55                         /// A value that indicates the top-most point of formatted text\r
56                         /// relative to the layout box, while excluding any glyph overhang.\r
57                         /// </summary>\r
58                         property float Top;\r
59 \r
60                         /// <summary>\r
61                         /// A value that indicates the width of the formatted text, while\r
62                         /// ignoring trailing whitespace at the end of each line.\r
63                         /// </summary>\r
64                         property float Width;\r
65 \r
66                         /// <summary>\r
67                         /// The width of the formatted text, taking into account the\r
68                         /// trailing whitespace at the end of each line.\r
69                         /// </summary>\r
70                         property float WidthIncludingTrailingWhitespace;\r
71 \r
72                         /// <summary>\r
73                         /// The height of the formatted text. The height of an empty string\r
74                         /// is set to the same value as that of the default font.\r
75                         /// </summary>\r
76                         property float Height;\r
77 \r
78                         /// <summary>\r
79                         /// The initial width given to the layout. It can be either larger\r
80                         /// or smaller than the text content width, depending on whether\r
81                         /// the text was wrapped.\r
82                         /// </summary>\r
83                         property float LayoutWidth;\r
84 \r
85                         /// <summary>\r
86                         /// Initial height given to the layout. Depending on the length of\r
87                         /// the text, it may be larger or smaller than the text content\r
88                         /// height.\r
89                         /// </summary>\r
90                         property float LayoutHeight;\r
91 \r
92                         /// <summary>\r
93                         /// The maximum reordering count of any line of text, used to\r
94                         /// calculate the most number of hit-testing boxes needed. If the\r
95                         /// layout has no bidirectional text, or no text at all, the\r
96                         /// minimum level is 1.\r
97                         /// </summary>\r
98                         property int MaximumBidiReorderingDepth;\r
99 \r
100                         /// <summary>\r
101                         /// Total number of lines.\r
102                         /// </summary>\r
103                         property int LineCount;\r
104                 };\r
105         }\r
106 }