|
19 | 19 | <tutorials> |
20 | 20 | </tutorials> |
21 | 21 | <methods> |
| 22 | + <method name="create_draw_list"> |
| 23 | + <return type="RID" /> |
| 24 | + <description> |
| 25 | + Creates a new, empty draw list resource. |
| 26 | + </description> |
| 27 | + </method> |
22 | 28 | <method name="create_font"> |
23 | 29 | <return type="RID" /> |
24 | 30 | <description> |
|
53 | 59 | Draws box displaying character hexadecimal code. Used for replacing missing characters. |
54 | 60 | </description> |
55 | 61 | </method> |
| 62 | + <method name="draw_list_add_custom" qualifiers="const"> |
| 63 | + <return type="void" /> |
| 64 | + <param index="0" name="list" type="RID" /> |
| 65 | + <param index="1" name="layer" type="int" /> |
| 66 | + <param index="2" name="transform" type="Transform2D" /> |
| 67 | + <param index="3" name="callback" type="Callable" /> |
| 68 | + <description> |
| 69 | + Adds custom draw call to a draw list [param list]. [param callback] is called with one argument, [RID] of canvas item to draw it to. |
| 70 | + </description> |
| 71 | + </method> |
| 72 | + <method name="draw_list_add_hexbox" qualifiers="const"> |
| 73 | + <return type="void" /> |
| 74 | + <param index="0" name="list" type="RID" /> |
| 75 | + <param index="1" name="layer" type="int" /> |
| 76 | + <param index="2" name="transform" type="Transform2D" /> |
| 77 | + <param index="3" name="pos" type="Vector2" /> |
| 78 | + <param index="4" name="index" type="int" /> |
| 79 | + <param index="5" name="size" type="int" /> |
| 80 | + <param index="6" name="modulate" type="Color" /> |
| 81 | + <description> |
| 82 | + Adds draw call for box displaying character hexadecimal code to a draw list [param list]. |
| 83 | + </description> |
| 84 | + </method> |
| 85 | + <method name="draw_list_add_line" qualifiers="const"> |
| 86 | + <return type="void" /> |
| 87 | + <param index="0" name="list" type="RID" /> |
| 88 | + <param index="1" name="layer" type="int" /> |
| 89 | + <param index="2" name="transform" type="Transform2D" /> |
| 90 | + <param index="3" name="start" type="Vector2" /> |
| 91 | + <param index="4" name="end" type="Vector2" /> |
| 92 | + <param index="5" name="width" type="float" /> |
| 93 | + <param index="6" name="dash" type="float" /> |
| 94 | + <param index="7" name="modulate" type="Color" /> |
| 95 | + <description> |
| 96 | + Adds draw call for a line to a draw list [param list]. |
| 97 | + </description> |
| 98 | + </method> |
| 99 | + <method name="draw_list_add_rect" qualifiers="const"> |
| 100 | + <return type="void" /> |
| 101 | + <param index="0" name="list" type="RID" /> |
| 102 | + <param index="1" name="layer" type="int" /> |
| 103 | + <param index="2" name="transform" type="Transform2D" /> |
| 104 | + <param index="3" name="rect" type="Rect2" /> |
| 105 | + <param index="4" name="filled" type="bool" /> |
| 106 | + <param index="5" name="modulate" type="Color" /> |
| 107 | + <description> |
| 108 | + Adds draw call for a rectangle to a draw list [param list]. |
| 109 | + </description> |
| 110 | + </method> |
| 111 | + <method name="draw_list_add_texture" qualifiers="const"> |
| 112 | + <return type="void" /> |
| 113 | + <param index="0" name="list" type="RID" /> |
| 114 | + <param index="1" name="layer" type="int" /> |
| 115 | + <param index="2" name="transform" type="Transform2D" /> |
| 116 | + <param index="3" name="texture" type="RID" /> |
| 117 | + <param index="4" name="rect" type="Rect2" /> |
| 118 | + <param index="5" name="modulate" type="Color" /> |
| 119 | + <description> |
| 120 | + Adds draw call for a texture to a draw list [param list]. |
| 121 | + </description> |
| 122 | + </method> |
| 123 | + <method name="draw_list_draw"> |
| 124 | + <return type="void" /> |
| 125 | + <param index="0" name="list" type="RID" /> |
| 126 | + <param index="1" name="ci" type="RID" /> |
| 127 | + <param index="2" name="free" type="bool" default="false" /> |
| 128 | + <description> |
| 129 | + Draws all draw calls in the draw list to the canvas item [param ci]. If [param free] is [code]true[/code], draw list is automatically deleted. |
| 130 | + </description> |
| 131 | + </method> |
| 132 | + <method name="draw_list_reserve"> |
| 133 | + <return type="void" /> |
| 134 | + <param index="0" name="list" type="RID" /> |
| 135 | + <param index="1" name="count" type="int" /> |
| 136 | + <description> |
| 137 | + Reserves space in the draw list [param list] for a [param count] draw calls. |
| 138 | + </description> |
| 139 | + </method> |
| 140 | + <method name="draw_list_sort"> |
| 141 | + <return type="void" /> |
| 142 | + <param index="0" name="list" type="RID" /> |
| 143 | + <description> |
| 144 | + Sorts draw calls in the draw list using to layer index and texture id. |
| 145 | + </description> |
| 146 | + </method> |
| 147 | + <method name="font_add_glyph_outline_to_draw_list" qualifiers="const"> |
| 148 | + <return type="void" /> |
| 149 | + <param index="0" name="font_rid" type="RID" /> |
| 150 | + <param index="1" name="layer" type="int" /> |
| 151 | + <param index="2" name="list" type="RID" /> |
| 152 | + <param index="3" name="transform" type="Transform2D" /> |
| 153 | + <param index="4" name="size" type="int" /> |
| 154 | + <param index="5" name="outline_size" type="int" /> |
| 155 | + <param index="6" name="pos" type="Vector2" /> |
| 156 | + <param index="7" name="index" type="int" /> |
| 157 | + <param index="8" name="color" type="Color" default="Color(1, 1, 1, 1)" /> |
| 158 | + <param index="9" name="oversampling" type="float" default="0.0" /> |
| 159 | + <description> |
| 160 | + Adds draw call for a single glyph outline to a draw list [param list]. |
| 161 | + </description> |
| 162 | + </method> |
| 163 | + <method name="font_add_glyph_to_draw_list" qualifiers="const"> |
| 164 | + <return type="void" /> |
| 165 | + <param index="0" name="font_rid" type="RID" /> |
| 166 | + <param index="1" name="layer" type="int" /> |
| 167 | + <param index="2" name="list" type="RID" /> |
| 168 | + <param index="3" name="transform" type="Transform2D" /> |
| 169 | + <param index="4" name="size" type="int" /> |
| 170 | + <param index="5" name="pos" type="Vector2" /> |
| 171 | + <param index="6" name="index" type="int" /> |
| 172 | + <param index="7" name="color" type="Color" default="Color(1, 1, 1, 1)" /> |
| 173 | + <param index="8" name="oversampling" type="float" default="0.0" /> |
| 174 | + <description> |
| 175 | + Adds draw call for a single glyph to a draw list [param list]. |
| 176 | + </description> |
| 177 | + </method> |
56 | 178 | <method name="font_clear_glyphs"> |
57 | 179 | <return type="void" /> |
58 | 180 | <param index="0" name="font_rid" type="RID" /> |
|
1361 | 1483 | Adds inline object to the text buffer, [param key] must be unique. In the text, object is represented as [param length] object replacement characters. |
1362 | 1484 | </description> |
1363 | 1485 | </method> |
| 1486 | + <method name="shaped_text_add_outline_to_draw_list" qualifiers="const"> |
| 1487 | + <return type="void" /> |
| 1488 | + <param index="0" name="shaped" type="RID" /> |
| 1489 | + <param index="1" name="layer" type="int" /> |
| 1490 | + <param index="2" name="list" type="RID" /> |
| 1491 | + <param index="3" name="transform" type="Transform2D" /> |
| 1492 | + <param index="4" name="pos" type="Vector2" /> |
| 1493 | + <param index="5" name="clip_l" type="float" default="-1" /> |
| 1494 | + <param index="6" name="clip_r" type="float" default="-1" /> |
| 1495 | + <param index="7" name="outline_size" type="int" default="1" /> |
| 1496 | + <param index="8" name="color" type="Color" default="Color(1, 1, 1, 1)" /> |
| 1497 | + <param index="9" name="oversampling" type="float" default="0.0" /> |
| 1498 | + <description> |
| 1499 | + Adds draw calls for text buffer glyph outlines to the draw list [param list]. |
| 1500 | + </description> |
| 1501 | + </method> |
1364 | 1502 | <method name="shaped_text_add_string"> |
1365 | 1503 | <return type="bool" /> |
1366 | 1504 | <param index="0" name="shaped" type="RID" /> |
|
1374 | 1512 | Adds text span and font to draw it to the text buffer. |
1375 | 1513 | </description> |
1376 | 1514 | </method> |
| 1515 | + <method name="shaped_text_add_to_draw_list" qualifiers="const"> |
| 1516 | + <return type="void" /> |
| 1517 | + <param index="0" name="shaped" type="RID" /> |
| 1518 | + <param index="1" name="layer" type="int" /> |
| 1519 | + <param index="2" name="list" type="RID" /> |
| 1520 | + <param index="3" name="transform" type="Transform2D" /> |
| 1521 | + <param index="4" name="pos" type="Vector2" /> |
| 1522 | + <param index="5" name="clip_l" type="float" default="-1" /> |
| 1523 | + <param index="6" name="clip_r" type="float" default="-1" /> |
| 1524 | + <param index="7" name="color" type="Color" default="Color(1, 1, 1, 1)" /> |
| 1525 | + <param index="8" name="oversampling" type="float" default="0.0" /> |
| 1526 | + <description> |
| 1527 | + Adds draw calls for text buffer glyphs to the draw list [param list]. |
| 1528 | + </description> |
| 1529 | + </method> |
1377 | 1530 | <method name="shaped_text_clear"> |
1378 | 1531 | <return type="void" /> |
1379 | 1532 | <param index="0" name="rid" type="RID" /> |
|
2199 | 2352 | <constant name="SUBPIXEL_POSITIONING_ONE_QUARTER_MAX_SIZE" value="16" enum="SubpixelPositioning"> |
2200 | 2353 | Maximum font size which will use "one quarter of the pixel" subpixel positioning in [constant SUBPIXEL_POSITIONING_AUTO] mode. |
2201 | 2354 | </constant> |
| 2355 | + <constant name="DRAW_CALL_NULL" value="0" enum="DrawCallType"> |
| 2356 | + Draw call that do nothing. |
| 2357 | + </constant> |
| 2358 | + <constant name="DRAW_CALL_NORMAL" value="1" enum="DrawCallType"> |
| 2359 | + Draw call for a normal glyph or glyph outline. |
| 2360 | + </constant> |
| 2361 | + <constant name="DRAW_CALL_MSDF" value="2" enum="DrawCallType"> |
| 2362 | + Draw call for a MSDF glyph or glyph outline. |
| 2363 | + </constant> |
| 2364 | + <constant name="DRAW_CALL_LCD" value="3" enum="DrawCallType"> |
| 2365 | + Draw call for a LCD anti-aliased glyph or glyph outline using. |
| 2366 | + </constant> |
| 2367 | + <constant name="DRAW_CALL_HEX" value="4" enum="DrawCallType"> |
| 2368 | + Draw call for a box displaying character hexadecimal code. |
| 2369 | + </constant> |
| 2370 | + <constant name="DRAW_CALL_LINE" value="5" enum="DrawCallType"> |
| 2371 | + Draw call for a line. |
| 2372 | + </constant> |
| 2373 | + <constant name="DRAW_CALL_RECT" value="6" enum="DrawCallType"> |
| 2374 | + Draw call for a rectangle. |
| 2375 | + </constant> |
| 2376 | + <constant name="DRAW_CALL_IMAGE" value="7" enum="DrawCallType"> |
| 2377 | + Draw call for a texture. |
| 2378 | + </constant> |
| 2379 | + <constant name="DRAW_CALL_CUSTOM" value="8" enum="DrawCallType"> |
| 2380 | + Draw call using custom draw callback. |
| 2381 | + </constant> |
2202 | 2382 | <constant name="FEATURE_SIMPLE_LAYOUT" value="1" enum="Feature"> |
2203 | 2383 | TextServer supports simple text layouts. |
2204 | 2384 | </constant> |
|
0 commit comments