renderer_alpha_blending_03.rml 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. <rml>
  2. <head>
  3. <title>Alpha blending 03</title>
  4. <link type="text/rcss" href="../style.rcss"/>
  5. <meta name="Description" content="The wheels in each container has two commutative filters, but applied in different order. The rendered result should be the same in each case, given that the renderer does alpha blending and color transformation correctly." />
  6. <meta name="Assert" content="The left and right wheels in each container should look equivalent. " />
  7. <meta name="Backend" content="Requires backend support for rendering with shaders and filters." />
  8. <style>
  9. body { width: 800dp; }
  10. .white { background: #fff; }
  11. .black { background: #000; }
  12. .container {
  13. padding: 15px;
  14. border: 1px #000;
  15. margin: 10px 15px 30px;
  16. height: 300px;
  17. }
  18. .wheel {
  19. position: relative;
  20. width: 49%;
  21. height: 300px;
  22. float: left;
  23. }
  24. .wheel > div {
  25. width: 200px;
  26. height: 200px;
  27. position: absolute;
  28. top: 0px;
  29. left: 0px;
  30. }
  31. .filter_ab { filter: contrast(0.5) opacity(0.5); }
  32. .filter_ba { filter: opacity(0.5) contrast(0.5); }
  33. .wheel > .rg { decorator: radial-gradient(#ff08 58%, transparent 60%); }
  34. .wheel > .rb { decorator: radial-gradient(#f0f8 58%, transparent 60%); left: 130px; }
  35. .wheel > .gb { decorator: radial-gradient(#0ff8 58%, transparent 60%); top: 100px; left: 75px; }
  36. </style>
  37. </head>
  38. <body>
  39. <div class="container white">
  40. <div class="wheel filter_ab">
  41. <div class="rg"/>
  42. <div class="rb"/>
  43. <div class="gb"/>
  44. </div>
  45. <div class="wheel filter_ba">
  46. <div class="rg"/>
  47. <div class="rb"/>
  48. <div class="gb"/>
  49. </div>
  50. </div>
  51. <div class="container black">
  52. <div class="wheel filter_ab">
  53. <div class="rg"/>
  54. <div class="rb"/>
  55. <div class="gb"/>
  56. </div>
  57. <div class="wheel filter_ba">
  58. <div class="rg"/>
  59. <div class="rb"/>
  60. <div class="gb"/>
  61. </div>
  62. </div>
  63. </body>
  64. </rml>