assert isinstance(matrix.asAffine(), (list, type(None))) def test_Matrix_setAffine(matrix): assert isinstance(matrix.setAffine([1, 0, 5, 0, 1, 3]), skia.Matrix) def test_Matrix_normalizePerspective(matrix): matrix.normalizePerspective() def test_Matrix_mapPoints(matrix): assert isinstance(matrix.mapPoints([skia.Point(1, 1)]), list) @pytest.mark.parametrize('pts', [[skia.Point3(1, 1, 1)], [skia.Point(1, 1)]]) def test_Matrix_mapHomogeneousPoints(matrix, pts): assert isinstance(matrix.mapHomogeneousPoints(pts), list) def test_Matrix_mapXY(matrix): assert isinstance(matrix.mapXY(0, 0), skia.Point) def test_Matrix_mapVectors(matrix): assert isinstance(matrix.mapVectors([skia.Point(0, 0)]), list) def test_Matrix_mapVector(matrix): assert isinstance(matrix.mapVector(0, 0), skia.Point)
def test_LightingImageFilter_MakeSpotLitSpecular(): assert isinstance(skia.LightingImageFilter.MakeSpotLitSpecular( skia.Point3(1, 0, 1), skia.Point3(-1, 0, -1), 1.2, 60, 0xFFFFFFFF, 1., 1., 1.), skia.ImageFilter)
def test_Point3_init(): assert isinstance(skia.Point3(4, 3, 0), skia.Point3) assert isinstance(skia.Point3.Make(4, 3, 0), skia.Point3)
def test_ImageFilters_SpotLitSpecular(): assert isinstance(skia.ImageFilters.SpotLitSpecular( skia.Point3(1, 0, 1), skia.Point3(-1, 0, -1), 1.2, 60, 0xFFFFFFFF, 1., 1., 1.), skia.ImageFilter)
def test_LightingImageFilter_MakePointLitDiffuse(): assert isinstance(skia.LightingImageFilter.MakePointLitDiffuse( skia.Point3(1, 0, 1), 0xFFFFFFFF, 1., 1.), skia.ImageFilter)
def test_ImageFilters_DistantLitDiffuse(): assert isinstance(skia.ImageFilters.DistantLitDiffuse( skia.Point3(1, 0, 1), 0xFFFFFFFF, 1., 1.), skia.ImageFilter)
def test_ImageFilters_PointLitSpecular(): assert isinstance(skia.ImageFilters.PointLitSpecular( skia.Point3(1, 0, 1), 0xFFFFFFFF, 1., 1., 1.), skia.ImageFilter)
def test_Point3_ne(point3): assert point3 != skia.Point3(4, 1, 1)
def test_Point3_isub(point3): point3 -= skia.Point3(1, 1, 1) assert point3.x() == 3
def test_Point3_iadd(point3): point3 += skia.Point3(1, 1, 1) assert point3.x() == 5
def test_Point3_init(args): assert isinstance(skia.Point3(*args), skia.Point3)
def point3(): return skia.Point3(4, 3, 0)