Files
QtGameMaker/help/files/409_05_paths.html
T

96 lines
3.2 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Paths</title>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body background="images/back.gif">
<!--START-->
<h3>Paths</h3>
It is possible to create paths and to add points to paths. However, never change a path
that is being used by an instance. This can lead to unexpected results. The following
functions exist:
<p>
<blockquote>
<tt><b>path_set_kind(ind,val)</b></tt>
Sets the kind of connections of the path with the
given index (0=straight, 1=smooth).<br>
<tt><b>path_set_closed(ind,closed)</b></tt>
Sets whether the path must be closed (true) or open (false).<br>
<tt><b>path_set_precision(ind,prec)</b></tt>
Sets the precision with which the smooth
path is calculated (should lie between 1 and 8).<br>
<tt><b>path_add()</b></tt>
Adds a new empty paths. The index of the path is returned.<br>
<tt><b>path_delete(ind)</b></tt>
Deletes the path with the given index.<br>
<tt><b>path_duplicate(ind)</b></tt>
Creates a duplicate copy of the path with the
given index. Returns the index of the copy.<br>
<tt><b>path_assign(ind,path)</b></tt>
Assigns the indicated path to path ind. So this
makes a copy of the path. In this way you can easily set an existing path to a different,
e.g. new path. <br>
<tt><b>path_append(ind,path)</b></tt>
Appends the indicated path to path ind. <br>
<tt><b>path_add_point(ind,x,y,speed)</b></tt>
Adds a point to the path with the given
index, at position (x,y) and with the given speed factor. Remember that a factor of 100
corresponds to the actual speed. Lower values mean slowing down and higher mean speeding up.<br>
<tt><b>path_insert_point(ind,n,x,y,speed)</b></tt>
Inserts a point in the path with
the given index before point n, at position (x,y) and with the given speed factor.<br>
<tt><b>path_change_point(ind,n,x,y,speed)</b></tt>
Changes the point n in the path
with the given index to position (x,y) and the given speed factor.<br>
<tt><b>path_delete_point(ind,n)</b></tt>
Deletes the point n in the path with the given index.<br>
<tt><b>path_clear_points(ind)</b></tt>
Clears all the points in the path, turning it into an empty path.<br>
<tt><b>path_reverse(ind)</b></tt>
Reverses the path.<br>
<tt><b>path_mirror(ind)</b></tt>
Mirrors the path horizontally (with respect to its center).<br>
<tt><b>path_flip(ind)</b></tt>
Flips the path vertically (with respect to its center).<br>
<tt><b>path_rotate(ind,angle)</b></tt>
Rotates the path counter clockwise over angle degrees (around its center).<br>
<tt><b>path_scale(ind,xscale,yscale)</b></tt>
Scales the path with the given factors (from its center).<br>
<tt><b>path_shift(ind,xshift,yshift)</b></tt>
Shifts the path over the given amount.<br>
</blockquote>
<p>
<!--END-->
</body>
</html>
<!-- KEYWORDS
path_set_kind()
path_set_closed()
path_set_precision()
path_add()
path_assign()
path_duplicate()
path_append()
path_delete()
path_add_point()
path_insert_point()
path_change_point()
path_delete_point()
path_clear_points()
path_reverse()
path_mirror()
path_flip()
path_rotate()
path_scale()
path_shift()
-->