← Back to team overview

kicad-developers team mailing list archive

Re: KiCad new look - new icons and new buttons

 

Hello,
thank you all for these replies, I have made some mockups for some
main toolbars:
http://www.vincentresearch.com/tmp/

26px for buttons and 48px for the KiCad icons seems ok to me. Anybody
is concern about the overall size of the new toolbars?

I am currently using this to go from .svg to .png:
inkscape -f file.svg -e file.png -d 120 -w 26 -h 26

before I was using imagemagick but I had some minor problems. I am not
really sure how to do this with a portable tool to be used during
compilation but it seems that many of you guys know.

GEDA uses .xpm files for its icons. Are we sure we gain much going to
.png? From all these discussions it sounds like a lot of work.

Regards
Fabrizio




On Tue, Aug 23, 2011 at 3:12 PM, Dick Hollenbeck <dick@xxxxxxxxxxx> wrote:
> On 08/23/2011 07:32 AM, Wayne Stambaugh wrote:
>>
>>> Then we have to decide on how to load the PNG files into the programs, and there
>>> seem to be at least two ways to do this:
>>>
>>>
>>> A) read the *.PNG files into memory from disk at program start time.
>>>
>>> B) convert the *.PNG files into a BYTE array which is compiled into the
>>> respective program.  But the byte array is definitely a PNG format, meaning we
>>> get the advantage of the alpha channel support, which we do not currently have.
>> C) Zip all the *.PNG files into an archive and use wxInputStream to access the
>> archive like a file system.
>>
>> My preference is B but I'm not sure exactly how you would access the byte
>> arrays directly with wxBitmap or wxImage.
>
>
> http://wiki.wxwidgets.org/Embedding_PNG_Images
>
> tells how.   The C program they are using to convert the *.png file to a byte
> array is nothing, and can be done in Cmake scripting lingo as I said.
>
> I also prefer B), which lets the linker do the determination ahead of time as to
> which bitmaps are needed by which program.
>
> There is difficulty using the C program to do this, when cross compiling,
> assuming you want that C program to be built with CMake.   Therefore I suggested
> using a *.cmake script to do it.
>
>
> The CMake script should at least:
>
>
> 1) convert each *.png file to a *.cpp file.
>
> 2) remember each *.png file that it converted, and output a single header file.
>
>
> the header file needs to have "per bitmap" entries in it.
>
> case 1) either this:
>
> extern unsigned char GBM_rotate_neg_X[];
> #define GBM_rotate_neg_X_SIZE;
>
> extern unsigned char GBM_rotate_pos_Y[];
> #define GBM_rotate_pos_Y_SIZE;
>
> :
>
> or this:
>
> case 2) this:
>
> extern wxBitmap* GPM_rotate_neg_X;        // @todo look into no pointer, but
> instance
> extern wxBitmap* GPM_rotate_pos_Y;
>
>
> In case 2) the *.cmake script can simply write code for each *.png file to
> construct the bitmap in the bitmap specific *.cpp file, which goes into the
> bitmap library:
>
> ------------------------------------------------------------------
>
> #include "bitmaps.h"
> #include <wxBitmap.h>
>
> static unsigned char bytes[] = { 0xab, 0xcd, ...};
>
>
> wxBitmap* GPM_rotate_neg_X = MakeBitmap( bytes, sizeof(bytes) );
>
> -------------------------------------------------------------------
>
> Then you put those into the bitmap library.
>
>
> For the new common function:
>
>
> static bool usingPNG;
>
> wxBitmap* MakeBitmap( unsigned char* bytes, int byteCount )
> {
>
>    if( !usingPNG )
>    {
>        usingPNG = true;
>        wxImage.AddHandler( New wxPNGHandler )
>
>        // other oneshot stuff.
>
>    }
>
>
>    return wxBitmap( as per the wiki entry );
>
> }
>
>
> ////////////////////
>
> So, can Windows wxWidgets be taught to support PNG?
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp
>


Follow ups

References