Graphics::drawFastVLine

Description

void Graphics::drawFastVLine( int16_t x , int16_t y , int16_t h )

Graphics::drawFastVLine draws a horizontal line, starting at (x, y) and with a certain height.

Parameters

  • int16_t x: x-coordinate to start
  • int16_t y: y-coordinate to start
  • int16_t h: height of the vertical line

Returns

none

Example

#include <Gamebuino-Meta.h>

void setup() {
  gb.begin();
}

void loop() {
  if (gb.update()) {
    gb.display.clear();
    gb.light.clear();

    // draw a border on the left of the screen in green
    gb.display.setColor(GREEN);
    gb.display.drawFastVLine(0, 0, gb.display.height());

    // make all the LEDs on the right red
    gb.light.setColor(RED);
    gb.light.drawFastVLine(1, 0, gb.light.height());
  }
}