Author Topic: use canon icons in module  (Read 486 times)

scrax

  • Contributor
  • Hero Member
  • *****
  • Posts: 1538
  • Code monkey
use canon icons in module
« on: March 13, 2019, 12:25:35 PM »
I've updatd my old C-Mode feat and Customized GUI to a module, finally. My goal is to make it compatible also with other rebel line cameras, for now it can compile and work good only on 600D and (with some less feat due to GUIMODE missing) for 500D.

But I would like to make it smaller and cleaner by using some canon icons that are not included in bmp.h
one icon is the flash +- shown when setting flash exp. comp.
other icon are the icon for the metering mode (i don't know if they are 4 different icons or only 3 icon for the different states combined)
Also the icon with only the up and down arrow I'm missing from canon.

For now I'm drawing them line by line with draw_line, draw_circle and so on, but is obviously not the best way.
I managed to add the icon.png for the up and down arrow and the play button but I'll prefer to use the one from canon if possible.

Any help or suggestion?


Another doubt is for the option to load some camera setting after stat-up. Actually I'm using the module main task to check if settings are to be loaded and to load them once, but for each loop it will keep checking if settings need to be loaded and if they are already loaded does nothing.
Seems a waste of resource, not? So where should I put the code in the module to make it load once only after startup?

I've attached the icon I' looking for
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12182
  • Maintenance mode
Re: use canon icons in module
« Reply #1 on: March 13, 2019, 06:12:23 PM »
There are a few icons from Canon fonts, defined in bmp.h.

However, these things are generally not portable, in particular, they won't work on newer models. We'll have to rework that part of the code for DIGIC 6/7/8 models, sooner or later, to use only our icons.

For symbols, there are two approaches:

- for "large" symbols, e.g. those used in ML menu: ico.c (built from PNG files in the "icons" directory); recommended for the above, but with our own artwork, not Canon's.

- for "small" symbols used inline with other text (such as the degree symbol): RBF fonts have a section for special symbols (SYM_ definitions from bmp.h). Disadvantages: need to edit all font sizes, non-standard string encoding, and... last time I checked, the RBF editor required an old version of Qt. We may have to dust off some old VM just for editing the fonts, unless someone updated the editor meanwhile.

srsa

  • New to the forum
  • *
  • Posts: 12
Re: use canon icons in module
« Reply #2 on: March 13, 2019, 07:47:32 PM »
last time I checked, the RBF editor required an old version of Qt. We may have to dust off some old VM just for editing the fonts, unless someone updated the editor meanwhile.
I have made another RBF editor (with its own quirks), currently available as Win32 binary (Wine compatible).

scrax

  • Contributor
  • Hero Member
  • *****
  • Posts: 1538
  • Code monkey
Re: use canon icons in module
« Reply #3 on: March 13, 2019, 08:26:19 PM »
There are a few icons from Canon fonts, defined in bmp.h.

However, these things are generally not portable, in particular, they won't work on newer models. We'll have to rework that part of the code for DIGIC 6/7/8 models, sooner or later, to use only our icons.

For symbols, there are two approaches:

- for "large" symbols, e.g. those used in ML menu: ico.c (built from PNG files in the "icons" directory); recommended for the above, but with our own artwork, not Canon's.

- for "small" symbols used inline with other text (such as the degree symbol): RBF fonts have a section for special symbols (SYM_ definitions from bmp.h). Disadvantages: need to edit all font sizes, non-standard string encoding, and... last time I checked, the RBF editor required an old version of Qt. We may have to dust off some old VM just for editing the fonts, unless someone updated the editor meanwhile.

Good to know that, I'll make my png and add them to ML icons then.
I'm using ML2.3 for photography with:
EOS 600DML | EOS 400Dplus | EOS 5D MLbeta5- EF 100mm f/2.8 USM Macro  - EF-S 17-85mm f4-5.6 IS USM - EF 70-200mm f/4 L USM - 580EXII - OsX, PS, LR, RawTherapee, LightZone -no video experience-