# Corner

The `Corner` class represents a corner, typically where two line segments meet

## Definition

*Namespace:* com.dynamsoft.core.basic_structures

*Assembly:* DynamsoftCaptureVisionBundle.aar

```java
class Corner
```

## Attributes & Methods

| Attributes | Type | Description |
| ---------- | ---- | ----------- |
| [`type`](#type) | *int* | The type of the corner. The types are availabled as normal-intersected, T-intersected, cross-intersected, not-intersected. |
| [`intersection`](#intersection) | *android.graphics.Point* | The coordinate of the intersection point of the corner. |
| [`line1`](#line1) | *[LineSegment](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/android/api-reference/core/basic-structures/line-segment.md)* | One of the lines of the corner. Defined in LineSegment. |
| [`line2`](#line2) | *[LineSegment](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/android/api-reference/core/basic-structures/line-segment.md)* | One of the lines of the corner. Defined in LineSegment. |

| Method | Description |
|------- |-------------|
| [`Corner`](#corner-1) | The default constructor. |
| [`Corner(type,insection,line1,line2)`](#cornertypeinsectionline1line2) | Constructs a corner from the type, intersection, and lines. |
| [`transformByMatrix`](#transformbymatrix) | Transforms the coordinates of the corner by a transformation matrix. |

### type

The type of the corner. The types are availabled as normal-intersected, T-intersected, cross-intersected, not-intersected.

```java
@EnumCornerType
int type;
```

Related APIs:

- [EnumCornerType](https://www.dynamsoft.com/capture-vision/docs/mobile/programming/android/api-reference/core/enum/corner-type.md)

### intersection

The coordinate of the intersection point of the corner.

```java
Point intersection;
```

### line1

One of the lines of the corner. Defined in `LineSegment`.

```java
LineSegment line1;
```

### line2

One of the lines of the corner. Defined in `LineSegment`.

```java
LineSegment line2;
```

### Corner

The default constructor.

```java
Corner();
```

### Corner(type,insection,line1,line2)

Constructs a corner from the type, intersection, and lines.

```java
Corner(int type,Point intersection,LineSegment line1,LineSegment line2);
```

### transformByMatrix

Transforms the coordinates of the corner by a transformation matrix.

```java
Corner transformByMatrix(Matrix matrix);
```

**Parameters**

`matrix`: The transformation matrix.

**Return Value**

The transformed corner.
