`Element::rest()` picks each element's last hold keyframe independently of every other element, so a composite built from it is not the screen at any moment in time -- it is a per-element maximum. For a transient that is exactly wrong: a two-frame flash's last hold IS the flash peak, so it burns forever. GP_TITLE build 4 is the case. `ptlogo_back2eff1`..`eff5` are five staggered two-frame flashes -- one light sweep drawn as five frames, all extinguished by t110 -- that `rest()` draws simultaneously and permanently. Five stacked white glows saturate the light arc behind the logo. The disc names the right instant: the midpoint of the longest interval containing no keyframe of any element. `UiBuild::settle_time()` and `settle_window()`; `screen render --settle` applies it and prints the window, whose width is how much the midpoint is worth. Predicted t=198 from [160,236] BEFORE scoring. Against the console capture, the arc band goes 33.22 -> 11.79 and pixels at the clipping level 8581 -> 1452, where the console has 1459 -- an unfitted statistic. Whole frame 14.07 -> 12.06. Controls at t=100 and t=358 are far worse, and a hand-picked visibility list reaches the identical numbers. `ComposeOptions::at` now poses every element rather than leaves only, which is why the earlier rotation pose scan was flat: it moved the sweeps and never touched the top-level flashes. `at = None` is byte-identical (cmp), the pre-rotation tag renders identically at rest, and the 13 paint-order tests plus the keyframe/focus/opt-link disc tests are green. Also fixes the diagnostic that caused a wrong finding to be sent to the port agent: `not drawn` listed bare names, and a kind-0x4 ghost carries its template's name, so four ghosts printed as `ptlogo1.t32`/`ptlogo2.t32` and read as "the logo is missing". It now prints index, name and reason. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QsEPXWVaEpyfudtR6re1Pd
20 lines
865 B
Rust
20 lines
865 B
Rust
use sylpheed_formats::{pak, ui_layout};
|
|
fn main(){
|
|
let mut a=std::env::args().skip(1);
|
|
let pk=a.next().unwrap(); let bi:usize=a.next().unwrap().parse().unwrap();
|
|
let ar=pak::PakArchive::open(pk).unwrap();
|
|
let by=ar.read(&ar.entries()[bi]).unwrap();
|
|
let b=ui_layout::parse_build(&by).unwrap();
|
|
for t in a {
|
|
let i:usize=t.parse().unwrap();
|
|
let e=&b.elements[i];
|
|
println!("[{i}] {} kind=0x{:x} parent={:?} pivot=({},{}) kfs={}",
|
|
e.name, e.kind, e.parent, e.pivot_x, e.pivot_y, e.keyframes.len());
|
|
for k in &e.keyframes {
|
|
println!(" t={:<5} a={:<4} xy=({},{}) s={}/{} rot={} u4={} u8={} tint={:08x}",
|
|
k.time.map(|v|v as i64).unwrap_or(-1), k.fade>>24, k.x,k.y,
|
|
k.scale_x,k.scale_y,k.rotation_deg,k.unknown_4,k.unknown_8,k.tint);
|
|
}
|
|
}
|
|
}
|