# HG changeset patch
# User Thomas Liebetraut <thomas@tommie-lie.de>
# Date 1396178635 -7200
#      Sun Mar 30 13:23:55 2014 +0200
# Node ID eee239b048d4aca26cf7b59bba4a5cafd4dfb3a4
# Parent  b57f18696badeb88f1032db9e2dd2b577d606b0d
Add EvQuadrilateral type required for text markup annotations.

EvQuadrilateral is a simple boxed type containing 4 EvPoints
that constitute the corners of a quadrilateral.
PDF markup annotations make use of this structure to define
an annotation's active area.

diff -r b57f18696bad -r eee239b048d4 libdocument/ev-annotation.c
--- a/libdocument/ev-annotation.c	Sun Mar 30 13:23:55 2014 +0200
+++ b/libdocument/ev-annotation.c	Sun Mar 30 13:23:55 2014 +0200
@@ -1322,3 +1322,31 @@
 
 	return TRUE;
 }
+
+/* EvQuadrilateral */
+G_DEFINE_BOXED_TYPE (EvQuadrilateral, ev_quadrilateral, ev_quadrilateral_copy, ev_quadrilateral_free)
+
+EvQuadrilateral*
+ev_quadrilateral_new (void)
+{
+	return g_new0 (EvQuadrilateral, 1);
+}
+
+EvQuadrilateral*
+ev_quadrilateral_copy (EvQuadrilateral* quad)
+{
+	EvQuadrilateral *new_quad;
+
+	g_return_val_if_fail (quad != NULL, NULL);
+
+	new_quad = g_new (EvQuadrilateral, 1);
+	*new_quad = *quad;
+
+	return new_quad;
+}
+
+void
+ev_quadrilateral_free (EvQuadrilateral* quad)
+{
+	g_free (quad);
+}
diff -r b57f18696bad -r eee239b048d4 libdocument/ev-annotation.h
--- a/libdocument/ev-annotation.h	Sun Mar 30 13:23:55 2014 +0200
+++ b/libdocument/ev-annotation.h	Sun Mar 30 13:23:55 2014 +0200
@@ -34,6 +34,25 @@
 
 G_BEGIN_DECLS
 
+/* EvQuadrilateral */
+#define EV_TYPE_QUADRILATERAL                   (ev_quadrilateral_get_type ())
+
+typedef struct _EvQuadrilateral EvQuadrilateral;
+
+struct _EvQuadrilateral
+{
+	EvPoint p1;
+	EvPoint p2;
+	EvPoint p3;
+	EvPoint p4;
+};
+
+GType            ev_quadrilateral_get_type (void) G_GNUC_CONST;
+EvQuadrilateral *ev_quadrilateral_new      (void);
+EvQuadrilateral *ev_quadrilateral_copy     (EvQuadrilateral *quad);
+void             ev_quadrilateral_free     (EvQuadrilateral *quad);
+
+
 /* EvAnnotation */
 #define EV_TYPE_ANNOTATION                      (ev_annotation_get_type())
 #define EV_ANNOTATION(object)                   (G_TYPE_CHECK_INSTANCE_CAST((object), EV_TYPE_ANNOTATION, EvAnnotation))
