/* Optimised routine to draw a horizontal line faster than setting individual pixels.  */
void lcdDrawHLine(uint16_t x0, uint16_t x1, uint16_t y, uint16_t color)
/* Optimised routine to draw a horizontal line faster than setting individual pixels.  */
void lcdDrawHLine(uint16_t x0, uint16_t x1, uint16_t y, uint16_t color)
{
  if (x1 < x0)
  {
    uint16_t x;
    x = x1;
    x1 = x0;
    x0 = x;
  }
  if(x0 >= hx8347dProperties.width)
  {
    x0 = hx8347dProperties.width-1;
  }
  if(x1 >= hx8347dProperties.width)
  {
    x1 = hx8347dProperties.width-1;
  }
  if(y >= hx8347dProperties.height)
  {
    y = hx8347dProperties.height-1;
  }
  fillRect(x0, y, x1, y, color);
}