Creating digits that fill an entire graphical display

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 8.

Moderator: Benj

Post Reply
Ariko
Posts: 18
Joined: Tue Feb 23, 2016 10:28 pm
Has thanked: 6 times
Been thanked: 8 times
Contact:

Creating digits that fill an entire graphical display

Post by Ariko »

Is there a way to display digits that fill the entire display area on a graphical display, e.g. any of the colour display models that are available within flowcode?
Using the print string function and the extended font size (i.e. parameter 31) it is possible to increase the display font by 6 times in width and height. But I have an application where I need to display 4 digits at the full height of the display so they can be read from a distance. The digits are the results of a measured value and therefore are likely to change with each measurement sample.

The particular display I wish to use has a ILI9341 driver and is operated via SPI.

Can anyone explain how do to create digits that fill the entire display area?

Many thanks
Ari

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Creating digits that fill an entire graphical display

Post by Benj »

Hello Ari,

The font on the gLCD in v8 is 6 pixels wide and 8 pixels high and so you could do something like this.

scaler = display_height / 8

if (scaler * 6 * num_characters) > display_width

then scaler = display_width / (num_characters * 6)

This way the full height of the display will be used unless this would mean you can't fit everything on horizontally. It should scale so you always get the biggest font scaling without stretching the characters.

Ariko
Posts: 18
Joined: Tue Feb 23, 2016 10:28 pm
Has thanked: 6 times
Been thanked: 8 times
Contact:

Re: Creating digits that fill an entire graphical display

Post by Ariko »

Ben,

Thank you for your quick reply. My question was perhaps a little more fundamental. Using the graphical display components in flowcode how do I increase the size of the font beyond the preset options provided?

Is there a scaler parameter that can be exposed within the display component or do I need to forget the dedicated display component and write pixel data to the display via the SPI Comms component to create large size digits? E.g. like sending a bitmap image of each digit to the display.

I have searched the forum for an example to point me in right direction but I as yet I have not found anything similar to what I need.

No doubt your advice to dynamically change the scale will be useful once I get the basic idea of how to write the large digits to the display.

Thanks

Ari

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: Creating digits that fill an entire graphical display

Post by Benj »

Hello Ari,

In Flowcode v8 the font sizes are fixed. In Flowcode v9 we have a fully dynamic font scaler and also a range of different fonts so very large text can look very nice.

Unfortunatley there was a lot of work done to make this happen behind the scenes and so the v9 components are not compatible with v8. You could maybe try the 30-day trial of v9 and see if it improves things for you.

Post Reply