How do I make dashed lines on the brain?

Hello. I was wondering if there is a way to make dashed lines on the brain. I’m assuming I will have to make a custom function to make the dashed line, but I wanted to check before I spend the time making one. Any help would be greatly appreciated.

Here is something I whipped up real quick that might help.

// Edit these values
  int line_length = 10;
  int print_at_y = 3;
  int total_length = 100;
  int dash_distance = 10;
  // Don't edit this value
  int current_position = 0;
  // Set the color of the line here
  Brain.Screen.setFillColor(vex::color::red);
  while (current_position < total_length) {
    for (int i = 0; i <= line_length; i++) {
      Brain.Screen.drawPixel(current_position, print_at_y);
      current_position += 1;
    }
    current_position += dash_distance;
  }
1 Like