Skip to content

Conversation

h2obrain
Copy link

@h2obrain h2obrain commented Jan 6, 2016

  • This is a new demo to dusplay functionalities of the ltdc display controller.
  • Circe/Rectangle/Triangle drawing functions were copied from Chuck McManis simple-graphics
  • The code is ordered badly and formatted worse.
  • I made this version mainly to get some feedback on the code before I put hours in code cleanup work.

@h2obrain h2obrain force-pushed the stm32_f4_new_ltdc_demo branch from 95f51d9 to 827e597 Compare January 7, 2016 22:33
swap(x0, y0);
swap(x1, y1);
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ollie, when you look at the Adafruit Graphics library fro draw line it has:


// Bresenham's algorithm - thx wikpedia
void Adafruit_GFX::drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1,
 uint16_t color) {
  int16_t steep = abs(y1 - y0) > abs(x1 - x0);
  if (steep) {
    _swap_int16_t(x0, y0);
    _swap_int16_t(x1, y1);
}
...

I suggest to avoid misunderstandings (and possibly litigation) in the future that you might want to express thanks to the Adafruit folks for code that helped you write this (Theirs is a pretty handy little library class, I started with it myself when I was putting together the simple graphics library repo).

@h2obrain
Copy link
Author

h2obrain commented Aug 3, 2016

okay, i'm closing this pull request for licensing reasons (and because my code is not well written anyway..)

@h2obrain h2obrain closed this Aug 3, 2016
@karlp
Copy link
Member

karlp commented Aug 3, 2016

well, that's whgat bresenhams is get gradiant, check steep, do shit. there's only so many ways to write it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants