Class CohenSutherlandLineClipper
Implements Cohen-Sutherland line clipping algorithm
Inherited Members
Namespace:
Assembly: .dll
Syntax
public final class CohenSutherlandLineClipper
Constructors
CohenSutherlandLineClipper(RectF clipBounds)
Creates a new instance of CohenSutherlandLineClipper class
Declaration
public CohenSutherlandLineClipper(RectF clipBounds)
Parameters
| Type | Name | Description |
|---|---|---|
| android.graphics.RectF | clipBounds | The clipping clipBounds |
CohenSutherlandLineClipper(Size viewportSize)
Creates a new instance of CohenSutherlandLineClipper class
Declaration
public CohenSutherlandLineClipper(Size viewportSize)
Parameters
| Type | Name | Description |
|---|---|---|
| Size | viewportSize | The viewport size |
Fields
clipBounds
Declaration
public final RectF clipBounds
Field Value
| Type | Description |
|---|---|
| android.graphics.RectF |
Methods
clip(PointF start, PointF end)
Performs clipping of the line specified by start and end points
Declaration
public final boolean clip(PointF start, PointF end)
Parameters
| Type | Name | Description |
|---|---|---|
| android.graphics.PointF | start | The start of the line to clip |
| android.graphics.PointF | end | The end of the line to clip |
Returns
| Type | Description |
|---|---|
| boolean | Returns true if clipping was successful |