Skip to content

line() incorrectly used instead of rect() in example code on reference pages #9

@per1234

Description

@per1234

On all these pages:
https://www.arduino.cc/en/Reference/TFTNoStroke
https://www.arduino.cc/en/Reference/TFTNoFill
https://www.arduino.cc/en/Reference/TFTWidth
https://www.arduino.cc/en/Reference/TFTHeight

Change:

  // draw a rectangle in the center of screen
  screen.line(screen.width()/2-5, screen.height()/2-5, 10, 10);

to:

  // draw a rectangle in the center of screen
  screen.rect(screen.width()/2-5, screen.height()/2-5, 10, 10);

Reference the example code in https://www.arduino.cc/en/Reference/TFTRect

Originally reported at http://forum.arduino.cc/index.php?topic=494624

This issue also occurs on the constructor reference page which is reported in addition to other issues with that page here: #8

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions