C# Class Sphere.Core.Utility.Line

A convenient Line object.
显示文件 Open project: Radnen/spherestudio Class Usage Examples

Public Methods

Method Description
DrawLine ( Graphics g, Pen pen ) : void

Draws this line to the System.Drawing.Graphics.

Line ( ) : System.Drawing

Creates a new, empty Line.

Line ( Line copy ) : System.Drawing

Creates a line from another line.

Line ( Point start, Point end ) : System.Drawing

Creates a line with some values.

Line ( short x1, short y1, short x2, short y2 ) : System.Drawing

Creates a line with some values.

ToRectangle ( ) : Rectangle

Grabs the area of this Line.

ToRectangle ( Line l ) : Rectangle

Grabs the area of a Line.

Method Details

DrawLine() public method

Draws this line to the System.Drawing.Graphics.
public DrawLine ( Graphics g, Pen pen ) : void
g System.Drawing.Graphics The System.Drawing.graphics to use.
pen System.Drawing.Pen The pen style to use.
return void

Line() public method

Creates a new, empty Line.
public Line ( ) : System.Drawing
return System.Drawing

Line() public method

Creates a line from another line.
public Line ( Line copy ) : System.Drawing
copy Line The other line to copy from.
return System.Drawing

Line() public method

Creates a line with some values.
public Line ( Point start, Point end ) : System.Drawing
start System.Drawing.Point The start Point.
end System.Drawing.Point The end Point.
return System.Drawing

Line() public method

Creates a line with some values.
public Line ( short x1, short y1, short x2, short y2 ) : System.Drawing
x1 short The start x.
y1 short The start y.
x2 short The end x.
y2 short The end y.
return System.Drawing

ToRectangle() public method

Grabs the area of this Line.
public ToRectangle ( ) : Rectangle
return System.Drawing.Rectangle

ToRectangle() public static method

Grabs the area of a Line.
public static ToRectangle ( Line l ) : Rectangle
l Line The line to convert
return System.Drawing.Rectangle