Table of Contents

Class CohenSutherlandClipping

Namespace
HelixToolkit.Wpf
Assembly
HelixToolkit.Wpf.dll

Provides line clipping against a rectangle.

public sealed class CohenSutherlandClipping
Inheritance
CohenSutherlandClipping
Inherited Members

Constructors

CohenSutherlandClipping(double, double, double, double)

Initializes a new instance of the CohenSutherlandClipping class.

public CohenSutherlandClipping(double xmin, double xmax, double ymin, double ymax)

Parameters

xmin double

The xmin.

xmax double

The xmax.

ymin double

The ymin.

ymax double

The ymax.

Methods

ClipLine(ref double, ref double, ref double, ref double)

Cohen–Sutherland clipping algorithm clips a line against a rectangle.

public bool ClipLine(ref double x0, ref double y0, ref double x1, ref double y1)

Parameters

x0 double
y0 double
x1 double
y1 double

Returns

bool

true if the line is inside

IsInside(double, double)

The is inside.

public bool IsInside(double x, double y)

Parameters

x double

The x.

y double

The y.

Returns

bool

The is inside.