draw method

  1. @override
void draw(
  1. Path context,
  2. num size
)
override

Renders this symbol type to the specified context with the specified size in square pixels.

The context implements the CanvasPathMethods interface. (Note that this is a subset of the CanvasRenderingContext2D interface!) See also d4_path.

Implementation

@override
draw(context, size) {
  final r = sqrt(size - min(size / 6, 1.7)) * 0.6189;
  context.moveTo(-r, -r);
  context.lineTo(r, r);
  context.moveTo(-r, r);
  context.lineTo(r, -r);
}