Specification link:

extend-namespace-01-f ← index → filters-blend-01-b

Tests that contain the draft-watermark are under development and may be incorrectly testing a feature.

# filters-background-01-f.svg
SVG Image | PNG Image

## Operator Script

Run the test. No interaction required.

## Pass Criteria

The test is passed if:

- each blue rectangle has the same shapes twice inside, once without filters applied, once with (blurred)
- from left to right, the blue rectangles contain the following shapes: [rectangle, circle, triangle], [rectangle], [rectangle, circle], [rectangle, circle, triangle]

## Test Description

Test background image processing.

The first subtest enables background image processing and adds an empty ‘g’ element which invokes the ShiftBGAndBlur filter. This filter takes the current accumulated background image (i.e., the entire reference graphic) as input, shifts its offscreen down, blurs it, and then writes the result to the canvas. Note that the offscreen for the filter is initialized to transparent black, which allows the already rendered rectangle, circle and triangle to show through after the filter renders its own result to the canvas.

The second subtest enables background image processing and instead invokes the ShiftBGAndBlur filter on the inner ‘g’ element. The accumulated background at the time the filter is applied contains only the rectangle. Because the children of the inner ‘g’ (i.e., the circle and triangle) are not part of the inner ‘g’ element's background and because ShiftBGAndBlur ignores SourceGraphic, the children of the inner ‘g’ do not appear in the result.

The third subtest enables background image processing and invokes the ShiftBGAndBlur on the ‘polygon’ element that draws the triangle. The accumulated background at the time the filter is applied contains the rectangle plus the circle ignoring the effect of the ‘opacity’ property on the inner ‘g’ element. (Note that the blurred circle at the bottom does not let the rectangle show through on its left side. This is due to ignoring the effect of the ‘opacity’ property.) Because the triangle itself is not part of the accumulated background and because ShiftBGAndBlur ignores SourceGraphic, the triangle does not appear in the result.

The fourth subtest is the same as the third except that filter ShiftBGAndBlur_WithSourceGraphic is invoked instead of ShiftBGAndBlur. ShiftBGAndBlur_WithSourceGraphic performs the same effect as ShiftBGAndBlur, but then renders the SourceGraphic on top of the shifted, blurred background image. In this case, SourceGraphic is the blue triangle; thus, the result is the same as in the fourth case except that the triangle now appears.

extend-namespace-01-f ← index → filters-blend-01-b