diff --git a/fitz/fitz.i b/fitz/fitz.i index ba737eb4c..68e4d0deb 100644 --- a/fitz/fitz.i +++ b/fitz/fitz.i @@ -6268,10 +6268,8 @@ def get_oc_items(self) -> list: It also adds default items that are missing in original path types. """ allkeys = ( - ("closePath", False), ("fill", None), - ("color", None), ("width", 0), ("lineCap", [0]), - ("lineJoin", 0), ("dashes", "[] 0"), ("stroke_opacity", 1), - ("fill_opacity", 1), ("even_odd", True), + "closePath", "fill", "color", "width", "lineCap", + "lineJoin", "dashes", "stroke_opacity", "fill_opacity", "even_odd", ) val = self.get_cdrawings(extended=extended) for i in range(len(val)): @@ -6294,9 +6292,9 @@ def get_oc_items(self) -> list: item = tuple([cmd] + [Point(i) for i in rest]) newitems.append(item) npath["items"] = newitems - if npath["type"] in ("f", "s", "fs"): - for k, v in allkeys: - npath[k] = npath.get(k, v) + if npath["type"] in ("f", "s"): + for k in allkeys: + npath[k] = npath.get(k) val[i] = npath return val