class_line2d.rst 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/Line2D.xml.
  6. .. _class_Line2D:
  7. Line2D
  8. ======
  9. **Inherits:** :ref:`Node2D<class_Node2D>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A 2D polyline that can optionally be textured.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. This node draws a 2D polyline, i.e. a shape consisting of several points connected by segments. **Line2D** is not a mathematical polyline, i.e. the segments are not infinitely thin. It is intended for rendering and it can be colored and optionally textured.
  15. \ **Warning:** Certain configurations may be impossible to draw nicely, such as very sharp angles. In these situations, the node uses fallback drawing logic to look decent.
  16. \ **Note:** **Line2D** is drawn using a 2D mesh.
  17. .. rst-class:: classref-introduction-group
  18. Tutorials
  19. ---------
  20. - `Matrix Transform Demo <https://godotengine.org/asset-library/asset/2787>`__
  21. - `2.5D Game Demo <https://godotengine.org/asset-library/asset/2783>`__
  22. .. rst-class:: classref-reftable-group
  23. Properties
  24. ----------
  25. .. table::
  26. :widths: auto
  27. +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+
  28. | :ref:`bool<class_bool>` | :ref:`antialiased<class_Line2D_property_antialiased>` | ``false`` |
  29. +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+
  30. | :ref:`LineCapMode<enum_Line2D_LineCapMode>` | :ref:`begin_cap_mode<class_Line2D_property_begin_cap_mode>` | ``0`` |
  31. +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+
  32. | :ref:`bool<class_bool>` | :ref:`closed<class_Line2D_property_closed>` | ``false`` |
  33. +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+
  34. | :ref:`Color<class_Color>` | :ref:`default_color<class_Line2D_property_default_color>` | ``Color(1, 1, 1, 1)`` |
  35. +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+
  36. | :ref:`LineCapMode<enum_Line2D_LineCapMode>` | :ref:`end_cap_mode<class_Line2D_property_end_cap_mode>` | ``0`` |
  37. +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+
  38. | :ref:`Gradient<class_Gradient>` | :ref:`gradient<class_Line2D_property_gradient>` | |
  39. +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+
  40. | :ref:`LineJointMode<enum_Line2D_LineJointMode>` | :ref:`joint_mode<class_Line2D_property_joint_mode>` | ``0`` |
  41. +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+
  42. | :ref:`PackedVector2Array<class_PackedVector2Array>` | :ref:`points<class_Line2D_property_points>` | ``PackedVector2Array()`` |
  43. +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+
  44. | :ref:`int<class_int>` | :ref:`round_precision<class_Line2D_property_round_precision>` | ``8`` |
  45. +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+
  46. | :ref:`float<class_float>` | :ref:`sharp_limit<class_Line2D_property_sharp_limit>` | ``2.0`` |
  47. +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+
  48. | :ref:`Texture2D<class_Texture2D>` | :ref:`texture<class_Line2D_property_texture>` | |
  49. +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+
  50. | :ref:`LineTextureMode<enum_Line2D_LineTextureMode>` | :ref:`texture_mode<class_Line2D_property_texture_mode>` | ``0`` |
  51. +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+
  52. | :ref:`float<class_float>` | :ref:`width<class_Line2D_property_width>` | ``10.0`` |
  53. +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+
  54. | :ref:`Curve<class_Curve>` | :ref:`width_curve<class_Line2D_property_width_curve>` | |
  55. +-----------------------------------------------------+---------------------------------------------------------------+--------------------------+
  56. .. rst-class:: classref-reftable-group
  57. Methods
  58. -------
  59. .. table::
  60. :widths: auto
  61. +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | |void| | :ref:`add_point<class_Line2D_method_add_point>`\ (\ position\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>` = -1\ ) |
  63. +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | |void| | :ref:`clear_points<class_Line2D_method_clear_points>`\ (\ ) |
  65. +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | :ref:`int<class_int>` | :ref:`get_point_count<class_Line2D_method_get_point_count>`\ (\ ) |const| |
  67. +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | :ref:`Vector2<class_Vector2>` | :ref:`get_point_position<class_Line2D_method_get_point_position>`\ (\ index\: :ref:`int<class_int>`\ ) |const| |
  69. +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | |void| | :ref:`remove_point<class_Line2D_method_remove_point>`\ (\ index\: :ref:`int<class_int>`\ ) |
  71. +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | |void| | :ref:`set_point_position<class_Line2D_method_set_point_position>`\ (\ index\: :ref:`int<class_int>`, position\: :ref:`Vector2<class_Vector2>`\ ) |
  73. +-------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  74. .. rst-class:: classref-section-separator
  75. ----
  76. .. rst-class:: classref-descriptions-group
  77. Enumerations
  78. ------------
  79. .. _enum_Line2D_LineJointMode:
  80. .. rst-class:: classref-enumeration
  81. enum **LineJointMode**: :ref:`🔗<enum_Line2D_LineJointMode>`
  82. .. _class_Line2D_constant_LINE_JOINT_SHARP:
  83. .. rst-class:: classref-enumeration-constant
  84. :ref:`LineJointMode<enum_Line2D_LineJointMode>` **LINE_JOINT_SHARP** = ``0``
  85. Makes the polyline's joints pointy, connecting the sides of the two segments by extending them until they intersect. If the rotation of a joint is too big (based on :ref:`sharp_limit<class_Line2D_property_sharp_limit>`), the joint falls back to :ref:`LINE_JOINT_BEVEL<class_Line2D_constant_LINE_JOINT_BEVEL>` to prevent very long miters.
  86. .. _class_Line2D_constant_LINE_JOINT_BEVEL:
  87. .. rst-class:: classref-enumeration-constant
  88. :ref:`LineJointMode<enum_Line2D_LineJointMode>` **LINE_JOINT_BEVEL** = ``1``
  89. Makes the polyline's joints bevelled/chamfered, connecting the sides of the two segments with a simple line.
  90. .. _class_Line2D_constant_LINE_JOINT_ROUND:
  91. .. rst-class:: classref-enumeration-constant
  92. :ref:`LineJointMode<enum_Line2D_LineJointMode>` **LINE_JOINT_ROUND** = ``2``
  93. Makes the polyline's joints rounded, connecting the sides of the two segments with an arc. The detail of this arc depends on :ref:`round_precision<class_Line2D_property_round_precision>`.
  94. .. rst-class:: classref-item-separator
  95. ----
  96. .. _enum_Line2D_LineCapMode:
  97. .. rst-class:: classref-enumeration
  98. enum **LineCapMode**: :ref:`🔗<enum_Line2D_LineCapMode>`
  99. .. _class_Line2D_constant_LINE_CAP_NONE:
  100. .. rst-class:: classref-enumeration-constant
  101. :ref:`LineCapMode<enum_Line2D_LineCapMode>` **LINE_CAP_NONE** = ``0``
  102. Draws no line cap.
  103. .. _class_Line2D_constant_LINE_CAP_BOX:
  104. .. rst-class:: classref-enumeration-constant
  105. :ref:`LineCapMode<enum_Line2D_LineCapMode>` **LINE_CAP_BOX** = ``1``
  106. Draws the line cap as a box, slightly extending the first/last segment.
  107. .. _class_Line2D_constant_LINE_CAP_ROUND:
  108. .. rst-class:: classref-enumeration-constant
  109. :ref:`LineCapMode<enum_Line2D_LineCapMode>` **LINE_CAP_ROUND** = ``2``
  110. Draws the line cap as a semicircle attached to the first/last segment.
  111. .. rst-class:: classref-item-separator
  112. ----
  113. .. _enum_Line2D_LineTextureMode:
  114. .. rst-class:: classref-enumeration
  115. enum **LineTextureMode**: :ref:`🔗<enum_Line2D_LineTextureMode>`
  116. .. _class_Line2D_constant_LINE_TEXTURE_NONE:
  117. .. rst-class:: classref-enumeration-constant
  118. :ref:`LineTextureMode<enum_Line2D_LineTextureMode>` **LINE_TEXTURE_NONE** = ``0``
  119. Takes the left pixels of the texture and renders them over the whole polyline.
  120. .. _class_Line2D_constant_LINE_TEXTURE_TILE:
  121. .. rst-class:: classref-enumeration-constant
  122. :ref:`LineTextureMode<enum_Line2D_LineTextureMode>` **LINE_TEXTURE_TILE** = ``1``
  123. Tiles the texture over the polyline. :ref:`CanvasItem.texture_repeat<class_CanvasItem_property_texture_repeat>` of the **Line2D** node must be :ref:`CanvasItem.TEXTURE_REPEAT_ENABLED<class_CanvasItem_constant_TEXTURE_REPEAT_ENABLED>` or :ref:`CanvasItem.TEXTURE_REPEAT_MIRROR<class_CanvasItem_constant_TEXTURE_REPEAT_MIRROR>` for it to work properly.
  124. .. _class_Line2D_constant_LINE_TEXTURE_STRETCH:
  125. .. rst-class:: classref-enumeration-constant
  126. :ref:`LineTextureMode<enum_Line2D_LineTextureMode>` **LINE_TEXTURE_STRETCH** = ``2``
  127. Stretches the texture across the polyline. :ref:`CanvasItem.texture_repeat<class_CanvasItem_property_texture_repeat>` of the **Line2D** node must be :ref:`CanvasItem.TEXTURE_REPEAT_DISABLED<class_CanvasItem_constant_TEXTURE_REPEAT_DISABLED>` for best results.
  128. .. rst-class:: classref-section-separator
  129. ----
  130. .. rst-class:: classref-descriptions-group
  131. Property Descriptions
  132. ---------------------
  133. .. _class_Line2D_property_antialiased:
  134. .. rst-class:: classref-property
  135. :ref:`bool<class_bool>` **antialiased** = ``false`` :ref:`🔗<class_Line2D_property_antialiased>`
  136. .. rst-class:: classref-property-setget
  137. - |void| **set_antialiased**\ (\ value\: :ref:`bool<class_bool>`\ )
  138. - :ref:`bool<class_bool>` **get_antialiased**\ (\ )
  139. If ``true``, the polyline's border will be anti-aliased.
  140. \ **Note:** **Line2D** is not accelerated by batching when being anti-aliased.
  141. .. rst-class:: classref-item-separator
  142. ----
  143. .. _class_Line2D_property_begin_cap_mode:
  144. .. rst-class:: classref-property
  145. :ref:`LineCapMode<enum_Line2D_LineCapMode>` **begin_cap_mode** = ``0`` :ref:`🔗<class_Line2D_property_begin_cap_mode>`
  146. .. rst-class:: classref-property-setget
  147. - |void| **set_begin_cap_mode**\ (\ value\: :ref:`LineCapMode<enum_Line2D_LineCapMode>`\ )
  148. - :ref:`LineCapMode<enum_Line2D_LineCapMode>` **get_begin_cap_mode**\ (\ )
  149. The style of the beginning of the polyline, if :ref:`closed<class_Line2D_property_closed>` is ``false``. Use :ref:`LineCapMode<enum_Line2D_LineCapMode>` constants.
  150. .. rst-class:: classref-item-separator
  151. ----
  152. .. _class_Line2D_property_closed:
  153. .. rst-class:: classref-property
  154. :ref:`bool<class_bool>` **closed** = ``false`` :ref:`🔗<class_Line2D_property_closed>`
  155. .. rst-class:: classref-property-setget
  156. - |void| **set_closed**\ (\ value\: :ref:`bool<class_bool>`\ )
  157. - :ref:`bool<class_bool>` **is_closed**\ (\ )
  158. If ``true`` and the polyline has more than 2 points, the last point and the first one will be connected by a segment.
  159. \ **Note:** The shape of the closing segment is not guaranteed to be seamless if a :ref:`width_curve<class_Line2D_property_width_curve>` is provided.
  160. \ **Note:** The joint between the closing segment and the first segment is drawn first and it samples the :ref:`gradient<class_Line2D_property_gradient>` and the :ref:`width_curve<class_Line2D_property_width_curve>` at the beginning. This is an implementation detail that might change in a future version.
  161. .. rst-class:: classref-item-separator
  162. ----
  163. .. _class_Line2D_property_default_color:
  164. .. rst-class:: classref-property
  165. :ref:`Color<class_Color>` **default_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_Line2D_property_default_color>`
  166. .. rst-class:: classref-property-setget
  167. - |void| **set_default_color**\ (\ value\: :ref:`Color<class_Color>`\ )
  168. - :ref:`Color<class_Color>` **get_default_color**\ (\ )
  169. The color of the polyline. Will not be used if a gradient is set.
  170. .. rst-class:: classref-item-separator
  171. ----
  172. .. _class_Line2D_property_end_cap_mode:
  173. .. rst-class:: classref-property
  174. :ref:`LineCapMode<enum_Line2D_LineCapMode>` **end_cap_mode** = ``0`` :ref:`🔗<class_Line2D_property_end_cap_mode>`
  175. .. rst-class:: classref-property-setget
  176. - |void| **set_end_cap_mode**\ (\ value\: :ref:`LineCapMode<enum_Line2D_LineCapMode>`\ )
  177. - :ref:`LineCapMode<enum_Line2D_LineCapMode>` **get_end_cap_mode**\ (\ )
  178. The style of the end of the polyline, if :ref:`closed<class_Line2D_property_closed>` is ``false``. Use :ref:`LineCapMode<enum_Line2D_LineCapMode>` constants.
  179. .. rst-class:: classref-item-separator
  180. ----
  181. .. _class_Line2D_property_gradient:
  182. .. rst-class:: classref-property
  183. :ref:`Gradient<class_Gradient>` **gradient** :ref:`🔗<class_Line2D_property_gradient>`
  184. .. rst-class:: classref-property-setget
  185. - |void| **set_gradient**\ (\ value\: :ref:`Gradient<class_Gradient>`\ )
  186. - :ref:`Gradient<class_Gradient>` **get_gradient**\ (\ )
  187. The gradient is drawn through the whole line from start to finish. The :ref:`default_color<class_Line2D_property_default_color>` will not be used if this property is set.
  188. .. rst-class:: classref-item-separator
  189. ----
  190. .. _class_Line2D_property_joint_mode:
  191. .. rst-class:: classref-property
  192. :ref:`LineJointMode<enum_Line2D_LineJointMode>` **joint_mode** = ``0`` :ref:`🔗<class_Line2D_property_joint_mode>`
  193. .. rst-class:: classref-property-setget
  194. - |void| **set_joint_mode**\ (\ value\: :ref:`LineJointMode<enum_Line2D_LineJointMode>`\ )
  195. - :ref:`LineJointMode<enum_Line2D_LineJointMode>` **get_joint_mode**\ (\ )
  196. The style of the connections between segments of the polyline. Use :ref:`LineJointMode<enum_Line2D_LineJointMode>` constants.
  197. .. rst-class:: classref-item-separator
  198. ----
  199. .. _class_Line2D_property_points:
  200. .. rst-class:: classref-property
  201. :ref:`PackedVector2Array<class_PackedVector2Array>` **points** = ``PackedVector2Array()`` :ref:`🔗<class_Line2D_property_points>`
  202. .. rst-class:: classref-property-setget
  203. - |void| **set_points**\ (\ value\: :ref:`PackedVector2Array<class_PackedVector2Array>`\ )
  204. - :ref:`PackedVector2Array<class_PackedVector2Array>` **get_points**\ (\ )
  205. The points of the polyline, interpreted in local 2D coordinates. Segments are drawn between the adjacent points in this array.
  206. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array<class_PackedVector2Array>` for more details.
  207. .. rst-class:: classref-item-separator
  208. ----
  209. .. _class_Line2D_property_round_precision:
  210. .. rst-class:: classref-property
  211. :ref:`int<class_int>` **round_precision** = ``8`` :ref:`🔗<class_Line2D_property_round_precision>`
  212. .. rst-class:: classref-property-setget
  213. - |void| **set_round_precision**\ (\ value\: :ref:`int<class_int>`\ )
  214. - :ref:`int<class_int>` **get_round_precision**\ (\ )
  215. The smoothness used for rounded joints and caps. Higher values result in smoother corners, but are more demanding to render and update.
  216. .. rst-class:: classref-item-separator
  217. ----
  218. .. _class_Line2D_property_sharp_limit:
  219. .. rst-class:: classref-property
  220. :ref:`float<class_float>` **sharp_limit** = ``2.0`` :ref:`🔗<class_Line2D_property_sharp_limit>`
  221. .. rst-class:: classref-property-setget
  222. - |void| **set_sharp_limit**\ (\ value\: :ref:`float<class_float>`\ )
  223. - :ref:`float<class_float>` **get_sharp_limit**\ (\ )
  224. Determines the miter limit of the polyline. Normally, when :ref:`joint_mode<class_Line2D_property_joint_mode>` is set to :ref:`LINE_JOINT_SHARP<class_Line2D_constant_LINE_JOINT_SHARP>`, sharp angles fall back to using the logic of :ref:`LINE_JOINT_BEVEL<class_Line2D_constant_LINE_JOINT_BEVEL>` joints to prevent very long miters. Higher values of this property mean that the fallback to a bevel joint will happen at sharper angles.
  225. .. rst-class:: classref-item-separator
  226. ----
  227. .. _class_Line2D_property_texture:
  228. .. rst-class:: classref-property
  229. :ref:`Texture2D<class_Texture2D>` **texture** :ref:`🔗<class_Line2D_property_texture>`
  230. .. rst-class:: classref-property-setget
  231. - |void| **set_texture**\ (\ value\: :ref:`Texture2D<class_Texture2D>`\ )
  232. - :ref:`Texture2D<class_Texture2D>` **get_texture**\ (\ )
  233. The texture used for the polyline. Uses :ref:`texture_mode<class_Line2D_property_texture_mode>` for drawing style.
  234. .. rst-class:: classref-item-separator
  235. ----
  236. .. _class_Line2D_property_texture_mode:
  237. .. rst-class:: classref-property
  238. :ref:`LineTextureMode<enum_Line2D_LineTextureMode>` **texture_mode** = ``0`` :ref:`🔗<class_Line2D_property_texture_mode>`
  239. .. rst-class:: classref-property-setget
  240. - |void| **set_texture_mode**\ (\ value\: :ref:`LineTextureMode<enum_Line2D_LineTextureMode>`\ )
  241. - :ref:`LineTextureMode<enum_Line2D_LineTextureMode>` **get_texture_mode**\ (\ )
  242. The style to render the :ref:`texture<class_Line2D_property_texture>` of the polyline. Use :ref:`LineTextureMode<enum_Line2D_LineTextureMode>` constants.
  243. .. rst-class:: classref-item-separator
  244. ----
  245. .. _class_Line2D_property_width:
  246. .. rst-class:: classref-property
  247. :ref:`float<class_float>` **width** = ``10.0`` :ref:`🔗<class_Line2D_property_width>`
  248. .. rst-class:: classref-property-setget
  249. - |void| **set_width**\ (\ value\: :ref:`float<class_float>`\ )
  250. - :ref:`float<class_float>` **get_width**\ (\ )
  251. The polyline's width.
  252. .. rst-class:: classref-item-separator
  253. ----
  254. .. _class_Line2D_property_width_curve:
  255. .. rst-class:: classref-property
  256. :ref:`Curve<class_Curve>` **width_curve** :ref:`🔗<class_Line2D_property_width_curve>`
  257. .. rst-class:: classref-property-setget
  258. - |void| **set_curve**\ (\ value\: :ref:`Curve<class_Curve>`\ )
  259. - :ref:`Curve<class_Curve>` **get_curve**\ (\ )
  260. The polyline's width curve. The width of the polyline over its length will be equivalent to the value of the width curve over its domain.
  261. .. rst-class:: classref-section-separator
  262. ----
  263. .. rst-class:: classref-descriptions-group
  264. Method Descriptions
  265. -------------------
  266. .. _class_Line2D_method_add_point:
  267. .. rst-class:: classref-method
  268. |void| **add_point**\ (\ position\: :ref:`Vector2<class_Vector2>`, index\: :ref:`int<class_int>` = -1\ ) :ref:`🔗<class_Line2D_method_add_point>`
  269. Adds a point with the specified ``position`` relative to the polyline's own position. If no ``index`` is provided, the new point will be added to the end of the points array.
  270. If ``index`` is given, the new point is inserted before the existing point identified by index ``index``. The indices of the points after the new point get increased by 1. The provided ``index`` must not exceed the number of existing points in the polyline. See :ref:`get_point_count<class_Line2D_method_get_point_count>`.
  271. .. rst-class:: classref-item-separator
  272. ----
  273. .. _class_Line2D_method_clear_points:
  274. .. rst-class:: classref-method
  275. |void| **clear_points**\ (\ ) :ref:`🔗<class_Line2D_method_clear_points>`
  276. Removes all points from the polyline, making it empty.
  277. .. rst-class:: classref-item-separator
  278. ----
  279. .. _class_Line2D_method_get_point_count:
  280. .. rst-class:: classref-method
  281. :ref:`int<class_int>` **get_point_count**\ (\ ) |const| :ref:`🔗<class_Line2D_method_get_point_count>`
  282. Returns the number of points in the polyline.
  283. .. rst-class:: classref-item-separator
  284. ----
  285. .. _class_Line2D_method_get_point_position:
  286. .. rst-class:: classref-method
  287. :ref:`Vector2<class_Vector2>` **get_point_position**\ (\ index\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_Line2D_method_get_point_position>`
  288. Returns the position of the point at index ``index``.
  289. .. rst-class:: classref-item-separator
  290. ----
  291. .. _class_Line2D_method_remove_point:
  292. .. rst-class:: classref-method
  293. |void| **remove_point**\ (\ index\: :ref:`int<class_int>`\ ) :ref:`🔗<class_Line2D_method_remove_point>`
  294. Removes the point at index ``index`` from the polyline.
  295. .. rst-class:: classref-item-separator
  296. ----
  297. .. _class_Line2D_method_set_point_position:
  298. .. rst-class:: classref-method
  299. |void| **set_point_position**\ (\ index\: :ref:`int<class_int>`, position\: :ref:`Vector2<class_Vector2>`\ ) :ref:`🔗<class_Line2D_method_set_point_position>`
  300. Overwrites the position of the point at the given ``index`` with the supplied ``position``.
  301. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  302. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  303. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  304. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  305. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  306. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  307. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  308. .. |void| replace:: :abbr:`void (No return value.)`