not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

21 lines
532 B

  1. /**
  2. _enyo.canvas.line_ is a canvas control that draws a line fitting
  3. the parameters specified in the _bounds_ property.
  4. */
  5. enyo.kind({
  6. name: "enyo.canvas.Line",
  7. kind: enyo.canvas.Shape,
  8. //* @protected
  9. renderSelf: function(ctx) {
  10. ctx.save();
  11. ctx.beginPath();
  12. ctx.strokeStyle = this.bounds.Style;
  13. ctx.lineWidth = this.bounds.width;
  14. ctx.lineCap = this.bounds.cap;
  15. ctx.moveTo(this.bounds.start_x, this.bounds.start_y);
  16. ctx.lineTo(this.bounds.finish_x, this.bounds.finish_y);
  17. ctx.stroke();
  18. ctx.restore();
  19. }
  20. });