mirror of
https://github.com/3b1b/manim.git
synced 2025-04-13 09:47:07 +00:00
Merge pull request #2177 from 3b1b/video-work
Fix issue with Difference
This commit is contained in:
commit
cce4ffbb60
1 changed files with 9 additions and 9 deletions
|
@ -11,15 +11,15 @@ from manimlib.mobject.types.vectorized_mobject import VMobject
|
|||
|
||||
def _convert_vmobject_to_skia_path(vmobject: VMobject) -> pathops.Path:
|
||||
path = pathops.Path()
|
||||
subpaths = vmobject.get_subpaths_from_points(vmobject.get_all_points())
|
||||
for subpath in subpaths:
|
||||
quads = vmobject.get_bezier_tuples_from_points(subpath)
|
||||
start = subpath[0]
|
||||
path.moveTo(*start[:2])
|
||||
for p0, p1, p2 in quads:
|
||||
path.quadTo(*p1[:2], *p2[:2])
|
||||
if vmobject.consider_points_equal(subpath[0], subpath[-1]):
|
||||
path.close()
|
||||
for submob in vmobject.family_members_with_points():
|
||||
for subpath in submob.get_subpaths():
|
||||
quads = vmobject.get_bezier_tuples_from_points(subpath)
|
||||
start = subpath[0]
|
||||
path.moveTo(*start[:2])
|
||||
for p0, p1, p2 in quads:
|
||||
path.quadTo(*p1[:2], *p2[:2])
|
||||
if vmobject.consider_points_equal(subpath[0], subpath[-1]):
|
||||
path.close()
|
||||
return path
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue