boxOps function

List<BoxOp> boxOps(
  1. int cp,
  2. Rect cell,
  3. double lineWidth
)

Returns the draw ops for cp within cell. Empty if cp is not handled programmatically (caller falls back to the font glyph).

Implementation

List<BoxOp> boxOps(int cp, Rect cell, double lineWidth) {
  final dash = _dashedOps(cp, cell, lineWidth);
  if (dash.isNotEmpty) return dash;
  final arms = _arms[cp];
  if (arms != null) return _armOps(arms, cell, lineWidth);
  if (cp >= 0x256D && cp <= 0x2570) return _roundedOps(cp, cell, lineWidth);
  if (cp >= 0x2571 && cp <= 0x2573) return _diagonalOps(cp, cell, lineWidth);
  if (cp >= 0x2580 && cp <= 0x259F) return _blockOps(cp, cell);
  return const [];
}