GradientColorStop.js 666 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * Gradient color stop is used to create the gradients by their color sections.
  3. *
  4. * The gradients are ordered, each stop has a target color that becomes solid on its offset value triggering the next color stop if there is one.
  5. *
  6. * @class
  7. * @param offset Offset of the color stop between 0 and 1 inclusive.
  8. * @param color CSS color value.
  9. * @constructor
  10. */
  11. function GradientColorStop(offset, color)
  12. {
  13. /**
  14. * Offset of the color stop between 0 and 1 inclusive.
  15. *
  16. * @type {number}
  17. */
  18. this.offset = offset;
  19. /**
  20. * CSS color value.
  21. *
  22. * @type {string}
  23. */
  24. this.color = color;
  25. }
  26. export {GradientColorStop};