def expand_udgarray(self, text, index): if self.handle_unsupported_macros: if index < len(text) and text[index] == '*': end = skoolmacro.parse_udgarray_with_frames(text, index)[0] else: end = skoolmacro.parse_udgarray(text, index)[0] return end, '' raise UnsupportedMacroError()
def expand_udgarray(self, text, index): if self.handle_unsupported_macros: if index < len(text) and text[index] == '*': end = skoolmacro.parse_udgarray_with_frames(text, index)[0] else: end = skoolmacro.parse_udgarray(text, index)[0] return end, '' raise skoolmacro.UnsupportedMacroError()
def _parse_udgarray(snapshot, param_str): end, crop_rect, fname, frame, alt, params = skoolmacro.parse_udgarray( param_str, 0, snapshot, False) udg_array, scale, flip, rotate, mask, tindex, alpha = params udgs = adjust_udgs(udg_array, flip, rotate) return Frame(udgs, scale, mask, *crop_rect, tindex=tindex, alpha=alpha)
def _parse_udgarray(snapshot, param_str): end, crop_rect, fname, frame, alt, params = skoolmacro.parse_udgarray(param_str, 0, snapshot, False) udg_array, scale, flip, rotate, mask = params udgs = adjust_udgs(udg_array, flip, rotate) return Frame(udgs, scale, mask, *crop_rect)