chromium/third_party/blink/web_tests/svg/custom/feComponentTransfer-Linear.svg

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" id="svg-root" width="100%" height="100%" viewBox="0 0 480 360" version="1.1" baseProfile="basic">
	<title id="test-title">feComponentTransfer Test - Linear</title>
	<desc id="test-desc">feComponentTransfer tests.</desc>
	<g id="test-body-content">
		<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="15" y="5" width="450" height="300" viewBox="0 0 650 420">
			<defs>
				<linearGradient id="MyGradient" gradientUnits="userSpaceOnUse" x1="10" y1="0" x2="590" y2="0">
					<stop offset="0" stop-color="#00ff00"/>
					<stop offset="1" stop-color="#000000"/>
				</linearGradient>
				<filter id="Identity" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
					<feComponentTransfer>
						<feFuncR type="identity"/>
					</feComponentTransfer>
				</filter>
				<filter id="DiscreteBlank" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
					<feComponentTransfer>
						<feFuncG type="linear" slope="1" intercept="0.0"/>
					</feComponentTransfer>
				</filter>
				<filter id="DiscreteFull" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
					<feComponentTransfer>
						<feFuncG type="linear" slope="-1" intercept="1.0"/>
					</feComponentTransfer>
				</filter>
				<filter id="DiscreteOrd" filterUnits="objectBoundingBox" x="0%" y="0%" width="100%" height="100%">
					<feComponentTransfer>
						<feFuncG type="linear" slope="0.5" intercept="0.25"/>
					</feComponentTransfer>
				</filter>
			</defs>
			<rect fill="none" stroke="blue" x="1" y="1" width="648" height="418"/>
			<g font-size="15" font-family="Verdana">
				<rect fill="none" stroke="blue" x="1" y="1" width="648" height="418"/>
				<rect x="20" y="10" width="580" height="40" fill="url(#MyGradient)" filter="url(#Identity)"/>
				<text x="20" y="70">type: identity</text>
				<rect x="20" y="110" width="580" height="40" fill="url(#MyGradient)" filter="url(#DiscreteBlank)"/>
				<text x="20" y="170">type: linear slope=1 intercept=0 -- Result should be identity</text>
				<rect x="20" y="210" width="580" height="40" fill="url(#MyGradient)" filter="url(#DiscreteFull)"/>
				<text x="20" y="270">type: linear slope=-1 intercept=0 -- Should invert the gradient</text>
				<rect x="20" y="310" width="580" height="40" fill="url(#MyGradient)" filter="url(#DiscreteOrd)"/>
				<text x="20" y="370">type: linear slope=0.5 intercept=0.25 -- Result should be less extreme gradient</text>
			</g>
		</svg>
	</g>
</svg>