magick_rust/types/
geometry_info.rs1use crate::bindings;
17
18#[derive(Debug, Copy, Clone, PartialEq)]
19pub struct GeometryInfo(bindings::GeometryInfo);
20
21impl GeometryInfo {
22 pub fn new() -> GeometryInfo {
23 let inner = bindings::GeometryInfo {
24 rho: 0.0,
25 sigma: 0.0,
26 xi: 0.0,
27 psi: 0.0,
28 chi: 0.0,
29 };
30
31 Self(inner)
32 }
33
34 pub fn set_rho(&mut self, rho: f64) {
35 self.0.rho = rho;
36 }
37 pub fn set_sigma(&mut self, sigma: f64) {
38 self.0.sigma = sigma;
39 }
40 pub fn set_xi(&mut self, xi: f64) {
41 self.0.xi = xi;
42 }
43 pub fn set_psi(&mut self, psi: f64) {
44 self.0.psi = psi;
45 }
46 pub fn set_chi(&mut self, chi: f64) {
47 self.0.chi = chi;
48 }
49
50 pub(crate) fn inner(&self) -> &bindings::GeometryInfo {
51 &self.0
52 }
53}
54
55impl Default for GeometryInfo {
56 fn default() -> Self {
57 Self::new()
58 }
59}