本文整理汇总了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)
示例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()