paintSnapGuides method
Paints snap guides
Implementation
void paintSnapGuides(
Canvas canvas,
Size canvasSize,
List<Offset> guideLines,
) {
final selectionTheme = theme.selectionTheme;
final paint = Paint()
..color = selectionTheme.borderColor.withValues(alpha: 0.5)
..strokeWidth = selectionTheme.borderWidth
..style = PaintingStyle.stroke;
for (final guide in guideLines) {
// Vertical guide
if (guide.dx.isFinite) {
canvas.drawLine(
Offset(guide.dx, 0),
Offset(guide.dx, canvasSize.height),
paint,
);
}
// Horizontal guide
if (guide.dy.isFinite) {
canvas.drawLine(
Offset(0, guide.dy),
Offset(canvasSize.width, guide.dy),
paint,
);
}
}
}