Method

PapersViewAnnotationsContextadd_annotation_sync

unstable 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.

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.

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.

The argument can be NULL.

Return value

Type: PpsAnnotation

The newly created annotation.

The returned data is owned by the instance.