def extract_mobject_family_members( self, mobjects, only_those_with_points=False): if only_those_with_points: method = Mobject.family_members_with_points else: method = Mobject.get_family return remove_list_redundancies(list( it.chain(*[method(m) for m in mobjects]) ))
def get_family(self): sub_families = list(map(Mobject.get_family, self.submobjects)) all_mobjects = [self] + list(it.chain(*sub_families)) return remove_list_redundancies(all_mobjects)
def get_all_isolated_substrings(self): tex_string = self.tex_string return remove_list_redundancies([ tex_string[slice(*span_tuple)] for span_tuple in self.tex_spans_dict.keys() ])
def get_additional_substrings_to_break_up(self): result = remove_list_redundancies( [*self.tex_to_color_map.keys(), *self.isolate]) if "" in result: result.remove("") return result