-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f3c818
commit da07cd1
Showing
5 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from manimforge.cairo import CairoCamera | ||
from manim import * | ||
|
||
def set_cairo_context_path(self, ctx, vmobject): | ||
points = self.transform_points_pre_display(vmobject, vmobject.points) | ||
if len(points) == 0: | ||
return | ||
CairoCamera().set_cairo_context_path(ctx, vmobject, np.asarray(points, dtype=np.float64)) | ||
return self | ||
|
||
# Monkeypatch the method | ||
Camera.set_cairo_context_path = set_cairo_context_path | ||
|
||
|
||
# Example Scene | ||
class Test(Scene): | ||
def construct(self): | ||
circle = Circle() | ||
self.play(Create(circle)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters