当前位置: 首页>>代码示例>>Python>>正文


Python TexMobject.set_stroke方法代码示例

本文整理汇总了Python中mobject.tex_mobject.TexMobject.set_stroke方法的典型用法代码示例。如果您正苦于以下问题:Python TexMobject.set_stroke方法的具体用法?Python TexMobject.set_stroke怎么用?Python TexMobject.set_stroke使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在mobject.tex_mobject.TexMobject的用法示例。


在下文中一共展示了TexMobject.set_stroke方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: get_kilogoogle

# 需要导入模块: from mobject.tex_mobject import TexMobject [as 别名]
# 或者: from mobject.tex_mobject.TexMobject import set_stroke [as 别名]
 def get_kilogoogle(self):
     G = self.get_google_logo()[-1]
     kilo = TextMobject("K")
     kilo.scale(1.5)
     kilo.next_to(G[-1], LEFT, SMALL_BUFF, DOWN)
     plus_plus = TexMobject("++")
     plus_plus.set_stroke(width = 1)
     plus_plus.next_to(G, RIGHT, SMALL_BUFF)
     return VGroup(kilo, G, plus_plus)
开发者ID:PythonJedi,项目名称:manim,代码行数:11,代码来源:256.py

示例2: kilo_google

# 需要导入模块: from mobject.tex_mobject import TexMobject [as 别名]
# 或者: from mobject.tex_mobject.TexMobject import set_stroke [as 别名]
    def kilo_google(self):
        self.create_four_billion_copies(1, Laptop())
        google = self.get_google_logo()
        google.next_to(
            self.group_of_four_billion_things, UP,
            buff = LARGE_BUFF,
            aligned_edge = LEFT
        )
        google.shift(RIGHT)
        millions = TextMobject("$\\sim$ Millions of servers")
        millions.next_to(google, RIGHT)
        plus_plus = TexMobject("++")
        plus_plus.next_to(google, RIGHT, SMALL_BUFF)
        plus_plus.set_stroke(width = 2)
        kilo = TextMobject("Kilo")
        kilo.scale(1.5)
        kilo.next_to(google[-1], LEFT, SMALL_BUFF, DOWN)
        kilogoogle = VGroup(kilo, google, plus_plus)

        four_billion = self.four_billions[1]
        laptop, h_line, target_kilogoogle = self.get_fraction(
            1, Laptop(), self.get_kilogoogle()
        )

        self.revert_to_original_skipping_status()
        self.play(DrawBorderThenFill(google))
        self.dither(2)
        self.play(Write(millions))
        self.dither(2)
        self.play(LaggedStart(
            Indicate, self.group_of_four_billion_things,
            run_time = 4,
            rate_func = there_and_back,
            lag_ratio = 0.25,
        ))
        self.play(FadeOut(millions), FadeIn(plus_plus))
        self.play(Write(kilo))
        self.dither()
        self.play(
            four_billion.restore,
            FadeOut(self.group_of_four_billion_things)
        )
        self.play(
            Transform(kilogoogle, target_kilogoogle),
            FadeIn(laptop),
            FadeIn(h_line),
        )
        self.dither()
开发者ID:PythonJedi,项目名称:manim,代码行数:50,代码来源:256.py


注:本文中的mobject.tex_mobject.TexMobject.set_stroke方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。