Class: Poppler::AnnotInk

Inherits:
AnnotMarkup show all
Defined in:
(unknown)

Instance Method Summary collapse

Methods inherited from AnnotMarkup

#date, #external_data, #get_popup_rectangle, #has_popup, #label, #label=, #opacity, #opacity=, #popup=, #popup_is_open, #popup_is_open=, #popup_rectangle=, #reply_to, #subject

Methods inherited from Annot

#annot_type, #border_width=, #color, #color=, #contents, #contents=, #flags, #flags=, #get_border_width, #get_rectangle, #modified, #name, #page_index, #rectangle=

Constructor Details

#initialize(doc, rect) ⇒ Poppler::Annot

Creates a new ink annotation that will be
located on rect when added to a page. See
poppler_page_add_annot()

Parameters:

Instance Method Details

#draw_below ⇒ Boolean

Returns whether the annotation is drawn below the page content or not.

Returns:

  • (Boolean)

#draw_below=(draw_below) ⇒ nil

This is typically used for highlight annotations. Technically, this implies that the
annotation is drawn using a multiply blend mode.

Parameters:

  • draw_below (Boolean) —

    whether the annotation should be drawn below the document content

Returns:

  • (nil)

#get_ink_list(n_paths) ⇒ Array<Poppler::Path>

Each element of the return value is a path.

Parameters:

  • n_paths (Integer) —

    to store the number of paths returned

Returns:

  • (Array<Poppler::Path>) —

    a GSList of PopplerPath

#set_ink_list(ink_list, n_paths) ⇒ nil

Each element of ink_list is a path. The annotation must have
already been added to a page, otherwise the annotation may be
wrongly positioned if the page is rotated or has a cropbox.

This function computes and set the appropriate smallest rectangle
area that contains all the points of ink_list. Setting the rectangle
afterwards with #poppler_annot_set_rectangle should not be done
to preserve scaling and positioning.

Parameters:

  • ink_list (Array<Poppler::Path>) —

    a list of Poppler::Path

  • n_paths (Integer)

Returns:

  • (nil)