Merge feat/ai-editing-data-s6b into feat/ai-editing-data-s6b2

This commit is contained in:
dotCooCoo
2026-11-07 15:57:45 -08:00
2 changed files with 8 additions and 6 deletions
+7 -5
View File
@@ -5761,11 +5761,13 @@ fn art_styles_write_the_same_bytes_again() {
near_lines(&rgb_without_cmyk(&shown(&again)), &rgb_without_cmyk(&shown(&first.program)));
}
/// `program` with the CMYK equivalents of RGB colors blanked out: the first four numbers of an RGB
/// color's `c m y k r g b Xa` (or `XA`) and of an RGB gradient stop's `c m y k r g b 2 ... Bs`. A
/// save of the reopened file computes them again from the RGB values read back at four decimals,
/// and on some platforms the CMYK conversion moves them by more than [`near_lines`] allows. The RGB
/// values stay compared.
/// `program` with the CMYK equivalents of plain RGB colors blanked out: the first four numbers of
/// `c m y k r g b Xa` (or `XA`) and of an RGB gradient stop's `c m y k r g b 2 ... Bs`. Named and
/// spot RGB colors (`... (name) tint Xk`, `Xx` and spot stops) are not blanked; the document this
/// is used on has none. The Generic CMYK separation of a color at the edge of the press gamut can
/// land on one of two results that differ by up to 0.01 when the RGB changes in its last float
/// bits, as it does between the first save and the save of the reopened file, and the platform's
/// float math decides which. The RGB values stay compared.
fn rgb_without_cmyk(program: &str) -> String {
let blank = |line: &str| {
let (prefix, rest) = line.strip_prefix("%_").map_or(("", line), |r| ("%_", r));
+1 -1
View File
@@ -19,7 +19,7 @@ use super::{Writer, Xy, blend_code, compound_path, hide};
use crate::ai_ops;
use crate::ps;
pub(in crate::ai_editing) const LARGE_CANVAS_STYLES: &str = "on a large canvas, objects with live effects are written as their vector art with their geometry effects applied, without shadows, glows or feathers, and graphic styles are left out of the editing data for other apps";
pub(in crate::ai_editing) const LARGE_CANVAS_STYLES: &str = "on a large canvas, no art styles or graphic styles are written, and objects with live effects keep only their geometry effects in the editing data for other apps";
pub(in crate::ai_editing) const PANEL_STYLES: &str = "graphic styles with gradient or pattern fills, with fills, strokes or effects the editing data can't hold as a graphic style, with a name another style has, with names over 1,024 bytes, or past 4,096 styles, are left out of the editing data for other apps";
pub(in crate::ai_editing) const PANEL_EMPTY: &str =
"a Graphic Styles panel with no style written opens from the editing data with a new document's styles";