Skip to content

Commit

Permalink
add missing pybind11 include
Browse files Browse the repository at this point in the history
  • Loading branch information
MeetWq committed Aug 30, 2024
1 parent 832cb4e commit d3973ce
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/skia/Picture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <include/core/SkBBHFactory.h>
#include <include/core/SkPictureRecorder.h>
#include <pybind11/operators.h>
#include <pybind11/stl.h>

namespace {

Expand Down
1 change: 1 addition & 0 deletions src/skia/Point.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "common.h"
#include <include/core/SkPoint3.h>
#include <pybind11/operators.h>
#include <pybind11/stl.h>

void initPoint(py::module &m) {
// IPoint
Expand Down
7 changes: 7 additions & 0 deletions tests/test_point.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,13 @@ def test_Point_init(args):
assert isinstance(skia.Point(*args), skia.Point)


def test_Point_Offset():
points = [skia.Point(1, 2), skia.Point(3, 4)]
points = skia.Point.Offset(points, 1, 1)
assert points[0].equals(2, 3)
assert points[1].equals(4, 5)


def test_Point_x(point):
assert point.x() == 4

Expand Down

0 comments on commit d3973ce

Please sign in to comment.