generationmake / DogGraphicDisplay

arduino library for EA dog graphic displays based on their own arduino library
GNU Lesser General Public License v2.1
6 stars 1 forks source link

Added simple drawing functions #1

Closed wuehr1999 closed 4 years ago

wuehr1999 commented 4 years ago

Hi @generationmake,

I took Your display library and added the following methods for drawing simple shapes based on a canvas:

I also added an Example3_DrawingFunctions to test all of them ;-)

generationmake commented 4 years ago

Hi @wuehr1999 these are very nice functions. But I think it would be better if we make the canvas more flexible and not fixed to 128x64 pixels. This would allow to use it also for the smaller displays. Or on bigger displays to use only a part of it. An init function should dynamically allocate the memory for the canvas and store its actual size in the class.

wuehr1999 commented 4 years ago

Hi @generationmake,

I added a alternative begin method:

Here the size of the canvas and it's position on the screen can be defined, so it is possible to use a specific part on the display. I think this is what You wanted?

generationmake commented 4 years ago

Yes, this is somehow what I expected. I think I will do some more tests and see how it works.

generationmake commented 4 years ago

Hi @wuehr1999 I have tested it and it seems to work. but when you set canvasSizeY to a different value in the createcanvas function it does not work and the output gets corrupted. Could you check this?

wuehr1999 commented 4 years ago

Hi @generationmake, i found the problem (fitting of canvasSizeY in the 8-bit pages) and fixed it. Could You please try if it is working for You now?

generationmake commented 4 years ago

library works for now. I will merge.