Hi Guys
Can someone please explain what the window macro in the ili9341 does as I've tried it out but nothing happens.
ili9341 various macros
-
- Posts: 136
- http://meble-kuchenne.info.pl
- Joined: Mon Mar 08, 2021 11:25 am
- Location: Cape Town South Africa
- Has thanked: 41 times
- Been thanked: 12 times
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: ili9341 various macros
Hello,
The Window macro basically defines an area of the display where pixel data will be drawn.
Macros like plot will create a window of 1x1 pixel before sending the foreground colour.
Macros like fastplot will just send the colour without creating the window.
The Window macro basically defines an area of the display where pixel data will be drawn.
Macros like plot will create a window of 1x1 pixel before sending the foreground colour.
Macros like fastplot will just send the colour without creating the window.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 136
- Joined: Mon Mar 08, 2021 11:25 am
- Location: Cape Town South Africa
- Has thanked: 41 times
- Been thanked: 12 times
Re: ili9341 various macros
Thanks Ben
Is there a way to draw a triangle like an up down arrow or a button with rounded corners? I have tried the ellipse but dose not give me the results I'm looking for.
Is there a way to draw a triangle like an up down arrow or a button with rounded corners? I have tried the ellipse but dose not give me the results I'm looking for.
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: ili9341 various macros
Hello,
An arrow could be done using lines or plot points.
A rounded box could be done by adding black lines to the outside of a rectangle and white to the inside as shown here. This is a bad example hand drawn by me but shows you what kind of things you can do.
Here's a much better example from the web.
Ideally you use COS and SIN to do the X,Y dims for you.
If you think these are something that should be standard on all GLCDs then let us know and we can maybe investigate.
An arrow could be done using lines or plot points.
A rounded box could be done by adding black lines to the outside of a rectangle and white to the inside as shown here. This is a bad example hand drawn by me but shows you what kind of things you can do.
Here's a much better example from the web.
Ideally you use COS and SIN to do the X,Y dims for you.
If you think these are something that should be standard on all GLCDs then let us know and we can maybe investigate.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 136
- Joined: Mon Mar 08, 2021 11:25 am
- Location: Cape Town South Africa
- Has thanked: 41 times
- Been thanked: 12 times
Re: ili9341 various macros
Hi Ben
Sorry for the delayed reply as I have been away for a few days. It would be great if you could make it standard in the GLCDs as I'm not an advanced programmer like many others and have no clue how to use COS & SIN as of yet.
Sorry for the delayed reply as I have been away for a few days. It would be great if you could make it standard in the GLCDs as I'm not an advanced programmer like many others and have no clue how to use COS & SIN as of yet.
-
- Posts: 136
- Joined: Mon Mar 08, 2021 11:25 am
- Location: Cape Town South Africa
- Has thanked: 41 times
- Been thanked: 12 times
Re: ili9341 various macros
Hi Guys
Is it possible to use sprites in flowcode as per video
https://www.youtube.com/watch?v=sRGXQg7 ... f&index=16
Is it possible to use sprites in flowcode as per video
https://www.youtube.com/watch?v=sRGXQg7 ... f&index=16
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: ili9341 various macros
Hello,
Yes bitmaps can currently be used using the Bitmap Drawer components. Is this what you need?
I've also spotted a lib for doing antialiased rounded rectangles so just need to get my head around it.
Yes bitmaps can currently be used using the Bitmap Drawer components. Is this what you need?
I've also spotted a lib for doing antialiased rounded rectangles so just need to get my head around it.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 136
- Joined: Mon Mar 08, 2021 11:25 am
- Location: Cape Town South Africa
- Has thanked: 41 times
- Been thanked: 12 times
Re: ili9341 various macros
Hi Ben
What i was referring to in the video is the way he clears the whole screen using Sprits to stop the the flickering. I have tried using the clear screen but that is really slow so now I'm clearing every line individual and that a lot of code but don't get the flickering and its quick.
What i was referring to in the video is the way he clears the whole screen using Sprits to stop the the flickering. I have tried using the clear screen but that is really slow so now I'm clearing every line individual and that a lot of code but don't get the flickering and its quick.
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: ili9341 various macros
I'll have a proper watch of the video and see if there's anything we can learn and apply to our libraries.
Doing a full screen write in one go would certainly reduce flicker and code complexity but would also require a lot of ram and so wouldn't work for a lot of MCU targets.
320 x 240 pixels * 16-bit colour = a RAM buffer of 150KB
For MCU devices that can support this it would be a great addition. I'll have a think of a nice way to try and do this maybe a display buffer component with routines to draw the full screen and then send to the display all in one go.
It might be possible to double buffer the display hardware as that would provide a very simple means to acheive full screen redraws. I'll check if the ILI displays can allow this.
edit, it looks like people have tried and the ILI9341 cannot do double buffering itself without sacrificing half of the screen.
https://www.reddit.com/r/arduino/commen ... i9341_tft/
Doing a full screen write in one go would certainly reduce flicker and code complexity but would also require a lot of ram and so wouldn't work for a lot of MCU targets.
320 x 240 pixels * 16-bit colour = a RAM buffer of 150KB
For MCU devices that can support this it would be a great addition. I'll have a think of a nice way to try and do this maybe a display buffer component with routines to draw the full screen and then send to the display all in one go.
It might be possible to double buffer the display hardware as that would provide a very simple means to acheive full screen redraws. I'll check if the ILI displays can allow this.
edit, it looks like people have tried and the ILI9341 cannot do double buffering itself without sacrificing half of the screen.
https://www.reddit.com/r/arduino/commen ... i9341_tft/
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel