paint method

  1. @override
void paint(
  1. PCanvas pCanvas, [
  2. GraphicContext? graphicContext
])
override

Implementation

@override
void paint(PCanvas pCanvas, [GraphicContext? graphicContext]) {
  graphicContext = resolveGraphicContext(graphicContext);

  var x1 = graphicContext.position.x + this.x1;
  var y1 = graphicContext.position.y + this.y1;

  var x2 = graphicContext.position.x + this.x2;
  var y2 = graphicContext.position.y + this.y2;

  pCanvas.strokePath(
      <num>[x1, y1, x2, y2], PStyle(color: graphicContext.color, size: size),
      closePath: false);
}