public readonly record struct ImageToleranceHow far two pictures of the same interface may be apart.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
⚠ The default is exact, which a GPU golden suite cannot afford and this can. Vixen.Graphics.Golden.Tests compares perceptually because MoltenVK and lavapipe round the same sRGB conversion differently and both are conformant, so a bitwise suite there is red from the day it is written. Nothing here is rendered by a driver — see SoftwareUiRasterizer — so the same arithmetic runs on every machine and a tolerance would have nothing to absorb except real differences.
The looser values exist anyway, for the one case that is not about drivers: a reference regenerated after a deliberate change to text shaping or corner geometry, where a reviewer wants to see whether anything else moved.
Fields and properties (5)
public int ChannelHow far one channel may differ, in 0–255, before that pixel counts as wrong.
public double FractionWhat fraction of pixels may be wrong before the picture is.
public static ImageTolerance ExactByte for byte.
public static ImageTolerance SlightA shade either way, and no pixel allowed to be wholly wrong.
public static ImageTolerance EdgesFor a picture whose antialiased edges may land differently.
Methods (1)
public ImageTolerance(int Channel, double Fraction)How far two pictures of the same interface may be apart.
Used by (6)
- ImageComparerVixen.Ui.Testing
- RasterizerTestsVixen.Ui.Testing.Tests
- ScreenshotTestsVixen.Ui.Testing.Tests
- UiTestVixen.Ui.Testing
- UiTestOptionsVixen.Ui.Testing
- VisualBaselineVixen.Ui.Testing