Skip to content

Internal structures

Orfeo Da Via edited this page Jul 28, 2014 · 3 revisions

Hierarchy of classes

A handle is an opaque pointer to handle objects. All functions in Haru include one or more handles in their parameter list. The following figure illustrates the relationship between the various types of handles.

http://libharu.org/figures/figure2.png

Document class (Doc)

The document class operates on a document object.

Page class (Page)

The page class is used to manipulate an individual page. AddPage() or InsertPage() create a page object.

Image class (Image)

The image class is mainly used to put an image to a page. The following functions create an image object.

  • loadPngImageFromFile()
  • loadJpegImageFromFile()
  • loadRawImageFromFile()
  • loadRawImageFromMem()

Font class (Font)

The font class is a font object. getFont() creates a font handle.

Encoding class (HPDF_Encoding)

The encoding handle is a handle to handle a encoding object. A encoding handle is returned by invoking HPDF_GetEncoding().

Outline (HPDF_Outline)

The outline class is used to operate an outline of a document. When createOutline() is invoked, an outline-node object is created and a node is returned.

Destination class (Destination)

The destination class specifies the view of the page to be displayed when the outline item or annotation is clicked. And the destination object is used to operate destination object.

Annotation Handle (HPDF_Annotation)

There are three type of annotation-object in libHaru:

  • text-annotation represents a "sticky note".
  • link-annotation represents a hypertext link to a destination.
  • URI-link-annotation represents a hypertext link to a web page.

The annotation handle is used to set properties of an annotation object.

Clone this wiki locally