Skip to content

Commit d3973ce

Browse files
committed
add missing pybind11 include
1 parent 832cb4e commit d3973ce

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

src/skia/Picture.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <include/core/SkBBHFactory.h>
44
#include <include/core/SkPictureRecorder.h>
55
#include <pybind11/operators.h>
6+
#include <pybind11/stl.h>
67

78
namespace {
89

src/skia/Point.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "common.h"
22
#include <include/core/SkPoint3.h>
33
#include <pybind11/operators.h>
4+
#include <pybind11/stl.h>
45

56
void initPoint(py::module &m) {
67
// IPoint

tests/test_point.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,13 @@ def test_Point_init(args):
105105
assert isinstance(skia.Point(*args), skia.Point)
106106

107107

108+
def test_Point_Offset():
109+
points = [skia.Point(1, 2), skia.Point(3, 4)]
110+
points = skia.Point.Offset(points, 1, 1)
111+
assert points[0].equals(2, 3)
112+
assert points[1].equals(4, 5)
113+
114+
108115
def test_Point_x(point):
109116
assert point.x() == 4
110117

0 commit comments

Comments
 (0)