Official TouchScreen - Drawing Graphics

Anything related to hardware, devices, drivers and how to use them with Ultibo.
jscoulter
Posts: 3
Joined: Mon May 27, 2019 9:31 am

Official TouchScreen - Drawing Graphics

Postby jscoulter » Mon May 27, 2019 9:51 am

Hi All.
Come back to Ultibo after a while away, and found the info on getting the Official 7'' touch screen work which was great!
Now, since I have an actual project to work on, I was wondering, can I still draw, say, a circle (or more than 1) on the screen?
Also, is there a away to use larger fonts?

Thanks,
User avatar
Ultibo
Site Admin
Posts: 2280
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: Official TouchScreen - Drawing Graphics

Postby Ultibo » Mon May 27, 2019 10:31 am

jscoulter wrote:Now, since I have an actual project to work on, I was wondering, can I still draw, say, a circle (or more than 1) on the screen?
Also, is there a away to use larger fonts?

Hi jscoulter, welcome to Ultibo!

Because the Official touchscreen is driven by the GPU pretty much everything is available when using it including text console, pixel framebuffer and accelerated 2D and 3D.

Check out the Graphics and Displays section of the Forum Quick Reference sticky for some starting points for true type fonts, images and other useful bits.

For a basic circle you can use the built in GraphicsWindowDrawCircle function or you can create a really fancy circle using OpenVG or OpenGL either directly or with something like the Asphyre library. Same applies to lines, rectangles, images and so on.

Lots of options, the choice is up to you.
Ultibo.org | Make something amazing
https://ultibo.org
jscoulter
Posts: 3
Joined: Mon May 27, 2019 9:31 am

Re: Official TouchScreen - Drawing Graphics

Postby jscoulter » Tue May 28, 2019 7:18 am

Cheers for that.
I was sure I could, just wasn't sure.
I downloaded the Asphyre code and took a quick look. I will work my way through it :-)

Thanks again
jscoulter
Posts: 3
Joined: Mon May 27, 2019 9:31 am

Re: Official TouchScreen - Drawing Graphics

Postby jscoulter » Thu May 30, 2019 7:56 am

Hi again.
what unit contains the "GraphicsWindowDrawCircle" as I cant find it......

Thanks, Jeremy
User avatar
Ultibo
Site Admin
Posts: 2280
Joined: Sat Dec 19, 2015 3:49 am
Location: Australia

Re: Official TouchScreen - Drawing Graphics

Postby Ultibo » Thu May 30, 2019 9:57 am

jscoulter wrote:what unit contains the "GraphicsWindowDrawCircle" as I cant find it......

Hey Jeremy, Check out the GraphicsConsole unit which supports (simple) circles, lines, rectangles etc.

A really quick and easy way to find things in the Ultibo source is to search on the Wiki or in the GitHub repo.

Cheers.
Ultibo.org | Make something amazing
https://ultibo.org
Gavinmc42
Posts: 1656
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Official TouchScreen - Drawing Graphics

Postby Gavinmc42 » Sat Jun 01, 2019 9:11 am

Been meaning to test this for days, only just found the time.

I took the latest Raspbian uSD card that was working on the 7" touchscreen.
Made a version of my PunkOS code which is OpenVG based.
viewtopic.php?f=9&t=1269
Renamed the Raspbian kernel7.img, copied the Ultibo kernel7.img file.

It just worked :D
Have not tried the touchscreen, been so long since I have used the Pi 7" screen.
Gavinmc42
Posts: 1656
Joined: Sun Jun 05, 2016 12:38 pm
Location: Brisbane, Australia

Re: Official TouchScreen - Drawing Graphics

Postby Gavinmc42 » Sat Jun 01, 2019 10:15 am

Ok, my clock is a bit oval so I will need to add some scaling for non square pixel screens.

What I did this time was copy all the boot files from the latest Pi sources onto a blank 256MB uSD card.
https://github.com/raspberrypi/firmware
Renamed kernel7.img and copied the PunkOS img file, again it just worked.

Did not need to play with config.txt or anything.
This resolution screen 800x480 is a bit pixelated, it would look better on a higher res one.
You cannot see it from the picture but the keypad behind the clock is just readable, the small ones are not.

I really do need to benchmark this OpenVG stuff but for simple stuff like a PDA OS it is looking pretty good.
Attachments
punkos3.png
punkos3.png (93.81 KiB) Viewed 624 times

Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest