checkbox.xml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <screenplay xmlns="urn:screenplay">
  3. <path id="check">
  4. <moveTo x="20" y="50" />
  5. <quadTo x1="40" y1="70" x2="40" y2="77" />
  6. <quadTo x1="45" y1="55" x2="75" y2="30" />
  7. </path>
  8. <roundRect id="frame"
  9. left="3" top="3" right="97" bottom="97"
  10. rx="17" ry="17" />
  11. <event kind="onLoad">
  12. <paint antiAlias="true" />
  13. <!-- draw the background -->
  14. <paint stroke="true" strokeWidth="4">
  15. <color color="0x66000000"/>
  16. </paint>
  17. <matrix translate="[0,2]"/>
  18. <add use="frame" />
  19. <paint>
  20. <color color="black"/>
  21. </paint>
  22. <matrix translate="[0,-2]"/>
  23. <add use="frame" />
  24. <paint stroke="false">
  25. <linearGradient points="[0,frame.top,0,frame.bottom]" tileMode="clamp"
  26. offsets="[0,0.65,1]">
  27. <color color="#F2F2F2" />
  28. <color color="#AFAFAF" />
  29. <color color="#C7C7C7" />
  30. </linearGradient>
  31. </paint>
  32. <add use="frame" />
  33. <!-- draw the checkmark background -->
  34. <paint stroke="true" strokeWidth="9">
  35. <shader/>
  36. <blur radius="1" blurStyle="normal"/>
  37. <color color="0x88777777"/>
  38. </paint>
  39. <matrix translate="[0,-2]" />
  40. <add use="check" />
  41. <paint>
  42. <color color="0x88BBBBBB"/>
  43. </paint>
  44. <matrix translate="[0,4]" />
  45. <add use="check" />
  46. <!-- draw the checkmark -->
  47. <paint>
  48. <maskFilter/>
  49. <color color="#66CC00"/>
  50. </paint>
  51. <matrix translate="[0,-2]" />
  52. <add use="check" />
  53. </event>
  54. </screenplay>