Skip to content

Commit

Permalink
Fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonGrace2282 committed Jun 19, 2024
1 parent 1384d16 commit 9370c4b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/cairo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ use numpy::ndarray::{s, Array2, ArrayView1, ArrayView2, Axis};
use numpy::PyReadonlyArray2;
use pyo3::intern;
use pyo3::prelude::*;
use pyo3::types::{PyTuple, PyDict};
use std::iter;

/// Check if two points are approximately equal
Expand Down Expand Up @@ -64,11 +65,12 @@ pub struct CairoCamera;
#[pymethods]
impl CairoCamera {
#[new]
fn new() -> Self {
#[pyo3(signature=(*_args, **_kwargs))]
fn new(_args: &Bound<'_, PyTuple>, _kwargs: Option<&Bound<'_, PyDict>>) -> Self {
Self
}

fn set_cairo_context_path<'py>(
pub fn set_cairo_context_path<'py>(
&self,
py: Python<'py>,
ctx: Py<PyAny>,
Expand Down Expand Up @@ -105,4 +107,8 @@ impl CairoCamera {
}
Ok(())
}

pub fn __getstate__(&self, py: Python<'_>) -> PyObject {
().to_object(py)
}
}

0 comments on commit 9370c4b

Please sign in to comment.