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

filters-background-01-f.svg

FAIL

raster image of filters-background-01-f.svg

Operator Script

Run the test. No interaction required.

Pass Criteria

The test is passed if:

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.