Class Line
Represents a line drawn between two points.
This class provides useful methods to simulate mouse movement across the screen.
Inheritance
Inherited Members
Namespace: RuriLib.LS
Assembly: RuriLib.dll
Syntax
public class Line
Constructors
| Improve this Doc View SourceLine(Point, Point)
Creates a line between two points.
Declaration
public Line(Point p1, Point p2)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Point | p1 | |
System.Drawing.Point | p2 |
Methods
| Improve this Doc View SourcegetOffsets(Int32)
Gets a given number of offsets from equally distant points in the line.
Declaration
public Point[] getOffsets(int quantity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | quantity | The amount of offsets to generate |
Returns
Type | Description |
---|---|
System.Drawing.Point[] | The array of the generated offsets |
getPoints(Int32)
Gets a given number of equally distant points in the line.
Declaration
public Point[] getPoints(int quantity)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | quantity | The amount of points to generate |
Returns
Type | Description |
---|---|
System.Drawing.Point[] | The array of the generated points |
HumanWindMouse(Double, Double, Double, Double, Double, Double, Double)
Gets the points drawn by a mouse when a human moves it across the screen.
Declaration
public Point[] HumanWindMouse(double xs, double ys, double xe, double ye, double gravity, double wind, double targetArea)
Parameters
Type | Name | Description |
---|---|---|
System.Double | xs | The x coordinate of the starting point |
System.Double | ys | The y coordinate of the starting point |
System.Double | xe | The x coordinate of the ending point |
System.Double | ye | The y coordinate of the ending point |
System.Double | gravity | The gravity the movement is subject to |
System.Double | wind | The non linearity of the movement |
System.Double | targetArea | The target area to reach |
Returns
Type | Description |
---|---|
System.Drawing.Point[] | The set of points to draw in order to emulate a humanlike movement of the mouse |