PapersView.AnnotationsContext.add_annotation_sync

### Method

# PapersView AnnotationsContextadd_annotation_sync

since: 48.0

#### Declaration [src]

    PpsAnnotation*
    pps_annotations_context_add_annotation_sync (
      PpsAnnotationsContext* self,
      gint page_index,
      PpsAnnotationType type,
      const PpsPoint* start,
      const PpsPoint* end,
      const GdkRGBA* color,
      const gpointer user_data
    )

#### Description [src]

Add an annotation based on the provided information.

Available since: 48.0

#### Parameters

`page_index`

  Type: `gint`

  The index of the page where the annotation will be added.

`type`

  Type: `PpsAnnotationType`

  The type of annotation to add.

`start`

  Type: `PpsPoint`

  Point where to start creating an annotation (ignored for ink annotations).

  The data is owned by the caller of the method.

`end`

  Type: `PpsPoint`

  Point where to end creating the annotation. It is ignored for TEXT annotations and ink annotations.

  The data is owned by the caller of the method.

`color`

  Type: `GdkRGBA`

  The color to give to the annotation.

  The data is owned by the caller of the method.

`user_data`

  Type: `const gpointer`

  A pointer with auxiliary data that is annotation-dependent. For text markup, this points to a `PpsAnnotationTextMarkupType`. For free text, this points to a `PangoFontDescription`. For ink, this points to a `PpsAnnotationInkAddData`.

  The argument can be `NULL`.

#### Return value

Type: `PpsAnnotation`

The newly created annotation.

The returned data is owned by the instance.