Commit e6b0c04c authored by Etienne Nadji's avatar Etienne Nadji
Browse files

Page object: img. frame @EPROF + renamed @EMBEDDED

- `@EMBEDDED`: `PageObject.use_embedded_icc` -> `PageObject.embedded_icc["use"]`
- `@EPROF`: `PageObject.embedded_icc["profile"]`
	modifié :         ../../TODO.md
	modifié :         pageobjects.py
parent 6a777976
......@@ -30,9 +30,10 @@
#### Image
- [ ] `IRENDER` (optional) Rendering Intent for Images. 0 = Perceptual; 1 = Relative Colorimetric; 2 = Saturation; 3 = Absolute Colorimetric
- [ ] `EPROF` (optional) Embedded ICC-Profile for images *(str, name of the profile)*
- [x] `EPROF` (optional) Embedded ICC-Profile for images *(str, name of the profile)*
- [ ] `Pagenumber` **undocumented**
- [ ] `COMPRESSIONMETHOD` **undocumented**
- [ ] `PRFILE` (optional) ICC-Profile for the image
#### Polygon, Polyline
......@@ -84,7 +85,7 @@ That should be implemented :
##### Without GUI elements to modify them
- [ ] `BASEO ` Offset from baseline *(dim, pica, 0 ?)*
- [ ] `BASEO` Offset from baseline *(dim, pica, 0 ?)*
- [x] `TXTSHX` Text shadow offset horizontally
- [x] `TXTSHY` Text shadow offset vertically
- [x] `TXTOUT` Outline width
......
......@@ -159,7 +159,7 @@ class PageObject(xmlc.PyScribusElement):
# Undocumented box from gXpos, gYpos, gWidth, gHeight
self.gbox = dimensions.DimBox()
self.use_embedded_icc = False
self.embedded_icc = {"use": False, "profile": False}
# --- Page object own_page and linking/id --------------------
......@@ -521,7 +521,10 @@ class PageObject(xmlc.PyScribusElement):
if self.ptype in ["image", "render"]:
if (embedded := xml.get("EMBEDDED")) is not None:
self.use_embedded_icc = xmlc.num_to_bool(embedded)
self.embedded_icc["use"] = xmlc.num_to_bool(embedded)
if (img_embedded_icc := xml.get("EPROF")) is not None:
self.embedded_icc["profile"] = img_embedded_icc
# --- Symbol attributes --------------------------------------
......@@ -665,7 +668,10 @@ class PageObject(xmlc.PyScribusElement):
# ------------------------------------------------------------
if self.ptype in ["image", "render"]:
xml.attrib["EMBEDDED"] = xmlc.bool_to_num(self.use_embedded_icc)
xml.attrib["EMBEDDED"] = xmlc.bool_to_num(self.embedded_icc["use"])
if self.embedded_icc["profile"]:
xml.attrib["EPROF"] = self.embedded_icc["profile"]
# --- Previous / Next item -----------------------------------
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment