123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <class name="Line2D" inherits="Node2D" category="Core" version="3.0.alpha.custom_build">
- <brief_description>
- A 2D line.
- </brief_description>
- <description>
- A line through several points in 2D space.
- </description>
- <tutorials>
- </tutorials>
- <demos>
- </demos>
- <methods>
- <method name="add_point">
- <return type="void">
- </return>
- <argument index="0" name="position" type="Vector2">
- </argument>
- <description>
- Add a point at the [code]position[/code]. Appends the point at the end of the line.
- </description>
- </method>
- <method name="get_begin_cap_mode" qualifiers="const">
- <return type="int" enum="Line2D.LineCapMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_default_color" qualifiers="const">
- <return type="Color">
- </return>
- <description>
- </description>
- </method>
- <method name="get_end_cap_mode" qualifiers="const">
- <return type="int" enum="Line2D.LineCapMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_gradient" qualifiers="const">
- <return type="Gradient">
- </return>
- <description>
- </description>
- </method>
- <method name="get_joint_mode" qualifiers="const">
- <return type="int" enum="Line2D.LineJointMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_point_count" qualifiers="const">
- <return type="int">
- </return>
- <description>
- Returns the Line2D's amount of points.
- </description>
- </method>
- <method name="get_point_position" qualifiers="const">
- <return type="Vector2">
- </return>
- <argument index="0" name="i" type="int">
- </argument>
- <description>
- Returns point [code]i[code]'s position.
- </description>
- </method>
- <method name="get_points" qualifiers="const">
- <return type="PoolVector2Array">
- </return>
- <description>
- </description>
- </method>
- <method name="get_round_precision" qualifiers="const">
- <return type="int">
- </return>
- <description>
- </description>
- </method>
- <method name="get_sharp_limit" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="get_texture" qualifiers="const">
- <return type="Texture">
- </return>
- <description>
- </description>
- </method>
- <method name="get_texture_mode" qualifiers="const">
- <return type="int" enum="Line2D.LineTextureMode">
- </return>
- <description>
- </description>
- </method>
- <method name="get_width" qualifiers="const">
- <return type="float">
- </return>
- <description>
- </description>
- </method>
- <method name="remove_point">
- <return type="void">
- </return>
- <argument index="0" name="i" type="int">
- </argument>
- <description>
- Remove the point at index [code]i[/code] from the line.
- </description>
- </method>
- <method name="set_begin_cap_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Line2D.LineCapMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_default_color">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Color">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_end_cap_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Line2D.LineCapMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_gradient">
- <return type="void">
- </return>
- <argument index="0" name="color" type="Gradient">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_joint_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Line2D.LineJointMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_point_position">
- <return type="void">
- </return>
- <argument index="0" name="i" type="int">
- </argument>
- <argument index="1" name="position" type="Vector2">
- </argument>
- <description>
- Overwites the position in point [code]i[/code] with the supplied [code]position[/code].
- </description>
- </method>
- <method name="set_points">
- <return type="void">
- </return>
- <argument index="0" name="points" type="PoolVector2Array">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_round_precision">
- <return type="void">
- </return>
- <argument index="0" name="precision" type="int">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_sharp_limit">
- <return type="void">
- </return>
- <argument index="0" name="limit" type="float">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture">
- <return type="void">
- </return>
- <argument index="0" name="texture" type="Texture">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_texture_mode">
- <return type="void">
- </return>
- <argument index="0" name="mode" type="int" enum="Line2D.LineTextureMode">
- </argument>
- <description>
- </description>
- </method>
- <method name="set_width">
- <return type="void">
- </return>
- <argument index="0" name="width" type="float">
- </argument>
- <description>
- </description>
- </method>
- </methods>
- <members>
- <member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode">
- Controls the style of the line's first point. Use [code]LINE_CAP_*[/code] constants. Default value: [code]LINE_CAP_NONE[/code].
- </member>
- <member name="default_color" type="Color" setter="set_default_color" getter="get_default_color">
- The line's color. Will not be used if a gradient is set.
- </member>
- <member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" enum="Line2D.LineCapMode">
- Controls the style of the line's last point. Use [code]LINE_CAP_*[/code] constants. Default value: [code]LINE_CAP_NONE[/code].
- </member>
- <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient">
- The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set.
- </member>
- <member name="joint_mode" type="int" setter="set_joint_mode" getter="get_joint_mode" enum="Line2D.LineJointMode">
- The style for the points inbetween the start and the end.
- </member>
- <member name="points" type="PoolVector2Array" setter="set_points" getter="get_points">
- The points that form the lines. The line is drawn between every point set in this array.
- </member>
- <member name="round_precision" type="int" setter="set_round_precision" getter="get_round_precision">
- The smoothness of the rounded joints and caps. This is only used if a cap or joint is set as round.
- </member>
- <member name="sharp_limit" type="float" setter="set_sharp_limit" getter="get_sharp_limit">
- The direction difference in radians between vector points. This value is only used if [code]joint mode[/code] is set to [code]LINE_JOINT_SHARP[/code].
- </member>
- <member name="texture" type="Texture" setter="set_texture" getter="get_texture">
- The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style.
- </member>
- <member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode">
- The style to render the [code]texture[/code] on the line. Use [code]LINE_TEXTURE_*[/code] constants. Default value: [code]LINE_TEXTURE_NONE[/code].
- </member>
- <member name="width" type="float" setter="set_width" getter="get_width">
- The line's width.
- </member>
- </members>
- <constants>
- <constant name="LINE_JOINT_SHARP" value="0">
- The line's joints will be pointy. If [code]sharp_limit[/code] is greater than the rotation of a joint, it becomes a bevel joint instead.
- </constant>
- <constant name="LINE_JOINT_BEVEL" value="1">
- The line's joints will be bevelled/chamfered.
- </constant>
- <constant name="LINE_JOINT_ROUND" value="2">
- The line's joints will be rounded.
- </constant>
- <constant name="LINE_CAP_NONE" value="0">
- Don't have a line cap.
- </constant>
- <constant name="LINE_CAP_BOX" value="1">
- Draws the line cap as a box.
- </constant>
- <constant name="LINE_CAP_ROUND" value="2">
- Draws the line cap as a circle.
- </constant>
- <constant name="LINE_TEXTURE_NONE" value="0">
- Takes the left pixels of the texture and renders it over the whole line.
- </constant>
- <constant name="LINE_TEXTURE_TILE" value="1">
- Tiles the texture over the line. The texture need to be imported with Repeat Enabled for it to work properly.
- </constant>
- </constants>
- </class>
|