def generate_points(self): self.svg_file = tex_to_svg_file( self.tex_string, self.template_tex_file ) SVGMobject.generate_points(self) if len(self.args) > 1: self.handle_multiple_args()
def generate_points(self): self.svg_file = tex_to_svg_file( self.get_modified_expression(), self.template_tex_file ) SVGMobject.generate_points(self) if self.is_input_a_list: self.handle_list_expression(self.expression)
def generate_points(self): if isinstance(self.expression, list): self.handle_list_expression() else: self.svg_file = tex_to_svg_file( "".join(self.expression), self.template_tex_file ) SVGMobject.generate_points(self)
def __init__(self, tex_string, **kwargs): digest_config(self, kwargs) assert (isinstance(tex_string, str)) self.tex_string = tex_string file_name = tex_to_svg_file(self.get_modified_expression(tex_string), self.template_tex_file) SVGMobject.__init__(self, file_name=file_name, **kwargs) if self.height is None: self.scale(TEX_MOB_SCALE_FACTOR) if self.organize_left_to_right: self.organize_submobjects_left_to_right()
def __init__(self, *args, **kwargs): digest_config(self, kwargs, locals()) ##TODO, Eventually remove this if len(args) == 1 and isinstance(args[0], list): self.args = args[0] ## assert (all([isinstance(a, str) for a in self.args])) self.tex_string = self.get_modified_expression() file_name = tex_to_svg_file(self.tex_string, self.template_tex_file) SVGMobject.__init__(self, file_name=file_name, **kwargs) if self.organize_left_to_right: self.organize_submobjects_left_to_right()
def __init__(self, tex_string, **kwargs): digest_config(self, kwargs) assert(isinstance(tex_string, str)) self.tex_string = tex_string file_name = tex_to_svg_file( self.get_modified_expression(tex_string), self.template_tex_file ) SVGMobject.__init__(self, file_name=file_name, **kwargs) if self.height is None: self.scale(TEX_MOB_SCALE_FACTOR) if self.organize_left_to_right: self.organize_submobjects_left_to_right()
def __init__(self, *args, **kwargs): digest_config(self, kwargs, locals()) ##TODO, Eventually remove this if len(args) == 1 and isinstance(args[0], list): self.args = args[0] ## assert(all([isinstance(a, str) for a in self.args])) self.tex_string = self.get_modified_expression() file_name = tex_to_svg_file( self.tex_string, self.template_tex_file ) SVGMobject.__init__(self, file_name = file_name, **kwargs) if self.organize_left_to_right: self.organize_submobjects_left_to_right()
def copy(self): ## The shallow copy method usually only cares about ## points and submobjects, but for TexMobjects with ## multiple parts the original_submobject list should ## be updated as well. copy_mobject = SVGMobject.copy(self) if hasattr(self, "expression_parts"): pairs = zip(self.submobject_family(), copy_mobject.submobject_family()) for submob, copy_submob in pairs: if submob in self.original_submobjects: index = self.original_submobjects.index(submob) copy_mobject.original_submobjects[index] = copy_submob return copy_mobject
def generate_points(self): SVGMobject.generate_points(self) if len(self.args) > 1: self.handle_multiple_args()
def generate_points(self): self.svg_file = tex_to_svg_file(self.tex_string, self.template_tex_file) SVGMobject.generate_points(self) if len(self.args) > 1: self.handle_multiple_args()