# HighlightAnnotation

Artifact: [androidx.pdf:pdf-core](https://developer.android.com/jetpack/androidx/releases/pdf) [View Source](https://cs.android.com/search?q=file:androidx/pdf/annotation/content/HighlightAnnotation.kt+class:androidx.pdf.annotation.content.HighlightAnnotation) Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

*** ** * ** ***


```
public final class HighlightAnnotation extends PdfAnnotation
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.pdf.annotation.content.PdfAnnotation](https://developer.android.com/reference/androidx/pdf/annotation/content/PdfAnnotation) ||
|   | ↳ | [androidx.pdf.annotation.content.HighlightAnnotation](https://developer.android.com/reference/androidx/pdf/annotation/content/HighlightAnnotation) |

*** ** * ** ***

Represents a Highlight Annotation in a PDF document.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/androidx/pdf/annotation/content/HighlightAnnotation#HighlightAnnotation(kotlin.Int,kotlin.collections.List,kotlin.Int)( int pageNum, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/RectF.html> bounds, int color )` |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/pdf/annotation/content/HighlightAnnotation#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/List.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/graphics/RectF.html>` | `https://developer.android.com/reference/androidx/pdf/annotation/content/HighlightAnnotation#getBounds()()` The list of bounding `https://developer.android.com/reference/android/graphics/RectF.html` of the annotation denoting areas on the page which are highlighted. |
| `final int` | `https://developer.android.com/reference/androidx/pdf/annotation/content/HighlightAnnotation#getColor()()` The color of the highlight. |
| `int` | `https://developer.android.com/reference/androidx/pdf/annotation/content/HighlightAnnotation#hashCode()()` |

### Inherited methods

From [androidx.pdf.annotation.content.PdfAnnotation](https://developer.android.com/reference/androidx/pdf/annotation/content/PdfAnnotation) `int` `https://developer.android.com/reference/androidx/pdf/annotation/content/PdfAnnotation#getPageNum()()`

The page number (0-indexed) where this annotation is located.

## Public constructors

### HighlightAnnotation

```
public HighlightAnnotation(
    int pageNum,
    @NonNull List<@NonNull RectF> bounds,
    int color
)
```

## Public methods

### equals

```
public boolean equals(Object other)
```

### getBounds

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

```
public final @NonNull List<@NonNull RectF> getBounds()
```

The list of bounding `https://developer.android.com/reference/android/graphics/RectF.html` of the annotation denoting areas on the page which are highlighted.

### getColor

Added in [1.0.0-beta01](https://developer.android.com/jetpack/androidx/releases/pdf#1.0.0-beta01)

```
public final int getColor()
```

The color of the highlight.

### hashCode

```
public int hashCode()
```