Skip to content

Add visual tests for blendMode() across renderers #1434

@avinxshKD

Description

@avinxshKD

Right now the visual test suite covers shapes, typography, and shape modes, but there's nothing for blendMode(). This is one of those things that breaks quietly across renderers and nobody notices until someone's sketch looks wrong

What I'm proposing:

Write visual regression tests for the common blend modes BLEND, ADD, MULTIPLY, SCREEN, DARKEST, LIGHTEST, DIFFERENCE, EXCLUSION using the existing visual testing framework from #1261

Each test would render a simple, deterministic scene (overlapping semi-transparent shapes on a colored background) and compare against a saved baseline. I'd cover JAVA2D, P2D, and P3D where applicable, since blend behavior can differ between renderers

I'd also add one test that switches blend modes mid-sketch to make sure sequential mode changes don't leave stale state.

Why this matters:

  • blendMode() is renderer-sensitive — small changes in the graphics pipeline can silently break it
  • It's a commonly used feature with no test coverage at all
  • The visual test infra is already in place, so this is purely additive work

What "done" would look like::

  • New test class(es) tagged with @tag("rendering") following the existing pattern in VisualTest
  • Baselines generated for at least one platform
  • Tests pass locally with ./gradlew :visual-tests:test
  • If any renderers behave differently by design, that's documented in the test comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions