1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// This file was generated by gir (https://github.com/gtk-rs/gir)
// from
// from gir-files (https://github.com/gtk-rs/gir-files)
// DO NOT EDIT

use glib::translate::*;

glib::wrapper! {
    /// A [`Quadrilateral`][crate::Quadrilateral] is used to describe rectangle-like polygon
    ///  with arbitrary inclination on a page.
    ///
    ///  Since: 0.26
    pub struct Quadrilateral(BoxedInline<ffi::PopplerQuadrilateral>);

    match fn {
        copy => |ptr| ffi::poppler_quadrilateral_copy(mut_override(ptr)),
        free => |ptr| ffi::poppler_quadrilateral_free(ptr),
        type_ => || ffi::poppler_quadrilateral_get_type(),
    }
}

impl Quadrilateral {
    /// Creates a new [`Quadrilateral`][crate::Quadrilateral]. It must be freed with `poppler_quadrilateral_free()` after use.
    ///
    /// # Returns
    ///
    /// a new [`Quadrilateral`][crate::Quadrilateral].
    #[doc(alias = "poppler_quadrilateral_new")]
    pub fn new() -> Quadrilateral {
        unsafe { from_glib_full(ffi::poppler_quadrilateral_new()) }
    }
}

impl Default for Quadrilateral {
    fn default() -> Self {
        Self::new()
    }
}