From: Julian Smart Date: Tue, 28 Mar 2006 11:12:48 +0000 (+0000) Subject: Use XPM for symbols and pictures on all platforms X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/91feb0d1ae0931e4164d9dea977151bc0e9c098a Use XPM for symbols and pictures on all platforms git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38410 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/demos/forty/card.cpp b/demos/forty/card.cpp index 25c9d532a4..7f126fdafa 100644 --- a/demos/forty/card.cpp +++ b/demos/forty/card.cpp @@ -36,10 +36,8 @@ #include "forty.h" #include "card.h" -#ifndef __WXMSW__ #include "pictures.xpm" -#include "symbols.xbm" -#endif +#include "symbols.xpm" wxBitmap* Card::m_pictureBmap = 0; wxBitmap* Card::m_symbolBmap = 0; @@ -61,11 +59,7 @@ Card::Card(int value, WayUp way_up) : { if (!m_symbolBmap) { -#ifdef __WXMSW__ - m_symbolBmap = new wxBitmap(_T("CardSymbols"), wxBITMAP_TYPE_BMP_RESOURCE); -#else - m_symbolBmap = new wxBitmap(Symbols_bits, Symbols_width, Symbols_height); -#endif + m_symbolBmap = new wxBitmap(symbols_xpm); if (!m_symbolBmap->Ok()) { ::wxMessageBox(_T("Failed to load bitmap CardSymbols"), _T("Error")); @@ -73,11 +67,7 @@ Card::Card(int value, WayUp way_up) : } if (!m_pictureBmap) { -#ifdef __WXMSW__ - m_pictureBmap = new wxBitmap(_T("CardPictures"), wxBITMAP_TYPE_BMP_RESOURCE); -#else m_pictureBmap = new wxBitmap(Pictures); -#endif if (!m_pictureBmap->Ok()) { ::wxMessageBox(_T("Failed to load bitmap CardPictures"), _T("Error")); diff --git a/demos/forty/forty.rc b/demos/forty/forty.rc index 8457ac83a3..e1fb6e531d 100644 --- a/demos/forty/forty.rc +++ b/demos/forty/forty.rc @@ -3,6 +3,4 @@ aaaaa ICON "cards.ico" #include "wx/msw/wx.rc" CardsIcon ICON "cards.ico" -CardPictures BITMAP "pictures.bmp" -CardSymbols BITMAP "symbols.bmp" diff --git a/demos/forty/pictures.bmp b/demos/forty/pictures.bmp deleted file mode 100644 index d8c3345521..0000000000 Binary files a/demos/forty/pictures.bmp and /dev/null differ diff --git a/demos/forty/symbols.bmp b/demos/forty/symbols.bmp deleted file mode 100644 index c993a061de..0000000000 Binary files a/demos/forty/symbols.bmp and /dev/null differ diff --git a/demos/forty/symbols.xpm b/demos/forty/symbols.xpm index d15a98adff..b72ffb1849 100644 --- a/demos/forty/symbols.xpm +++ b/demos/forty/symbols.xpm @@ -1,93 +1,78 @@ -/* XPM */ -static char *symbols[] = { -/* width height num_colors chars_per_pixel */ -" 117 70 16 1", -/* colors */ -"` c #ffffff", -". c #ff0000", -"# c #000000", -"a c #b40000", -"b c #000000", -"c c #000000", -"d c #000000", -"e c #000000", -"f c #000000", -"g c #000000", -"h c #000000", -"i c #000000", -"j c #000000", -"k c #000000", -"l c #000000", -"m c #000000", -/* pixels */ -"```#``````.````..`..````#````````````````````````````````````````````````````````````````````````````````````````````", -"``###````...``.......``###```````````````````````````````````````````````````````````````````````````````````````````", -"`#`#`#``.....`.......`#####``````````````````````````````````````````````````````````````````````````````````````````", -"#######..............#######`````````````````````````````````````````````````````````````````````````````````````````", -"`#`#`#``.....``.....``#####``````````````````````````````````````````````````````````````````````````````````````````", -"```#`````...````...`````#````````````````````````````````````````````````````````````````````````````````````````````", -"``###`````.``````.`````###```````````````````````````````````````````````````````````````````````````````````````````", -"``###`````.``````.`````###```````````````````````````````````````````````````````````````````````````````````````````", -"```#`````...````...`````#````````````````````````````````````````````````````````````````````````````````````````````", -"`#`#`#``.....``.....``#####``````````````````````````````````````````````````````````````````````````````````````````", -"#######..............#######`````````````````````````````````````````````````````````````````````````````````````````", -"`#`#`#``.....`.......`#####``````````````````````````````````````````````````````````````````````````````````````````", -"``###````...``.......``###```````````````````````````````````````````````````````````````````````````````````````````", -"```#``````.````..`..````#````````````````````````````````````````````````````````````````````````````````````````````", -"````###`````````.```````..```..```````#``````````````````````````````````````````````````````````````````````````````", -"```#####```````...`````....`....`````###`````````````````````````````````````````````````````````````````````````````", -"```#####```````...````...........```#####````````````````````````````````````````````````````````````````````````````", -"````###```````.....```...........``#######```````````````````````````````````````````````````````````````````````````", -"`##``#``##```.......``...........`#########``````````````````````````````````````````````````````````````````````````", -"####`#`####`.........`...........###########`````````````````````````````````````````````````````````````````````````", -"###########``.......```.........`###########`````````````````````````````````````````````````````````````````````````", -"####`#`####```.....`````.......``####`#`####`````````````````````````````````````````````````````````````````````````", -"`##``#``##`````...```````.....````##``#``##``````````````````````````````````````````````````````````````````````````", -"````###````````...````````...````````###`````````````````````````````````````````````````````````````````````````````", -"``#######```````.``````````.```````#######```````````````````````````````````````````````````````````````````````````", -"``#######```````.``````````.```````#######```````````````````````````````````````````````````````````````````````````", -"````###````````...````````...````````###`````````````````````````````````````````````````````````````````````````````", -"`##``#``##`````...```````.....````##``#``##``````````````````````````````````````````````````````````````````````````", -"####`#`####```.....`````.......``####`#`####`````````````````````````````````````````````````````````````````````````", -"###########``.......```.........`###########`````````````````````````````````````````````````````````````````````````", -"####`#`####`.........`...........###########`````````````````````````````````````````````````````````````````````````", -"`##``#``##```.......``...........`#########``````````````````````````````````````````````````````````````````````````", -"````###```````.....```...........``#######```````````````````````````````````````````````````````````````````````````", -"```#####```````...````...........```#####````````````````````````````````````````````````````````````````````````````", -"```#####```````...`````....`....`````###`````````````````````````````````````````````````````````````````````````````", -"````###`````````.```````..```..```````#``````````````````````````````````````````````````````````````````````````````", -"``##````###``#####````#``#####``###``#####``###```###`#``##``#####``###``#```#```````````````````````````````````````", -"`#``#``#```#````#````##``#`````#`````````#`#```#`#```##`#``#````#``#```#`#``#````````````````````````````````````````", -"#````#`````#```#````#`#``####``#````````#``#```#`#```##`#``#````#``#```#`#`#`````````````````````````````````````````", -"#````#```##```###``#``#``````#`####````#````###```#####`#``#````#``#```#`##``````````````````````````````````````````", -"######``#````````#`#####`````#`#```#```#```#```#`````##`#``#````#``#`#`#`#`#`````````````````````````````````````````", -"#````#`#`````#```#````#``#```#`#```#```#```#```#````#`#`#``#`#``#``#``#``#``#````````````````````````````````````````", -"#````#`#####``###`````#```###```###````#````###````#``#``##```##````##`#`#```#```````````````````````````````````````", -"#````#`#####``###```#`````###```###````#````###````#```##``#```##``#`##``#```#```````````````````````````````````````", -"#````#`````#`#```#``#````#```#`#```#```#```#```#``#```#``#`#``#``#``#``#``#``#```````````````````````````````````````", -"######````#``#`````#####`#`````#```#```#```#```#`#````#``#`#``#````#`#`#```#`#```````````````````````````````````````", -"#````#``##````###```#``#`#`````#####```#````###``####`#``#`#``#````#```#````##```````````````````````````````````````", -"#````#`#```````#````#`#```####`````#``#````#```#`#```##``#`#``#````#```#```#`#```````````````````````````````````````", -"`#``#``#```#``#`````##```````#`````#`#`````#```#`#```##``#`#``#````#```#``#``#```````````````````````````````````````", -"``##````###``#####``#````#####``###``#####``###```###``##``#`#####``###``#```#```````````````````````````````````````", -"```##``````#####```#######``````##```#######````####```#######```#####````#####``##``###```#######```#####```##````#`", -"``####````#######``######``````###```#######```#####```#######``#######``#######`##`#####``#######``#######``##```##`", -"`######```##```##`````##``````####```##```````###``````````###``##```##``##```##`##`##`##``````##```##```##``##``###`", -"###``###``````###````##``````#####```######```##``````````###```###`###``##```##`##`##`##``````##```##```##``##`###``", -"##````##````####````####````###`##```#######``######`````###`````#####```#######`##`##`##``````##```##```##``#####```", -"########```####`````#####```##``##````````##``#######````##``````#####````######`##`##`##``````##```##```##``####````", -"########``###``````````###``#######```````##``##```##````##`````###`###``````###`##`##`##``````##```####`##``#####```", -"##````##``##```````##```##``#######``##```##``##```##````##`````##```##`````###``##`##`##``##``##```##`####``##`###``", -"##````##``#######``#######``````##```#######``#######````##`````#######````###```##`#####``######```######```##``###`", -"##````##``#######```#####```````##````#####````#####`````##``````#####````###````##``###````####`````######``##```##`", -"`##````##`#######```#####````##```````#####````#####``````##`````#####``````###````###``##```####```######```##```##`", -"`##````##`#######``#######```##``````#######``#######`````##````#######````###````#####`##``######```######``###``##`", -"`##````##``````##``##```##``#######``##```##``##```##`````##````##```##```###`````##`##`##``##``##``####`##```###`##`", -"`########`````###``###``````#######``##```````##```##`````##````###`###``###``````##`##`##``##``````##`####````#####`", -"`########```####````#####````##``##``##```````#######`````##`````#####```######```##`##`##``##``````##```##`````####`", -"`##````##``####``````####````##`###``#######```######````###`````#####```#######``##`##`##``##``````##```##````#####`", -"`###``###`###`````````##`````#####````######```````##```###`````###`###``##```##``##`##`##``##``````##```##```###`##`", -"``######``##```##````##``````####`````````##``````###``###``````##```##``##```##``##`##`##``##``````##```##``###``##`", -"```####```#######```######```###`````#######```#####```#######``#######``#######``#####`##`#######``#######``##```##`", -"````##`````#####```#######```##``````#######```####````#######```#####````#####````###``##`#######```#####```#````##`" -}; +/* XPM */ +static char *symbols_xpm[] = { +/* columns rows colors chars-per-pixel */ +"117 70 2 1", +". c Black", +" c #FFFFFF", +/* pixels */ +" . . .. .. . ", +" ... ... ....... ... ", +" . . . ..... ....... ..... ", +"............................ ", +" . . . ..... ..... ..... ", +" . ... ... . ", +" ... . . ... ", +" ... . . ... ", +" . ... ... . ", +" . . . ..... ..... ..... ", +"............................ ", +" . . . ..... ....... ..... ", +" ... ... ....... ... ", +" . . .. .. . ", +" ... . .. .. . ", +" ..... ... .... .... ... ", +" ..... ... ........... ..... ", +" ... ..... ........... ....... ", +" .. . .. ....... ........... ......... ", +".... . .... ......... ...................... ", +"........... ....... ......... ........... ", +".... . .... ..... ....... .... . .... ", +" .. . .. ... ..... .. . .. ", +" ... ... ... ... ", +" ....... . . ....... ", +" ....... . . ....... ", +" ... ... ... ... ", +" .. . .. ... ..... .. . .. ", +".... . .... ..... ....... .... . .... ", +"........... ....... ......... ........... ", +".... . .... ......... ...................... ", +" .. . .. ....... ........... ......... ", +" ... ..... ........... ....... ", +" ..... ... ........... ..... ", +" ..... ... .... .... ... ", +" ... . .. .. . ", +" .. ... ..... . ..... ... ..... ... ... . .. ..... ... . . ", +" . . . . . .. . . . . . . .. . . . . . . . ", +". . . . . . .... . . . . . .. . . . . . . . ", +". . .. ... . . . .... . ... ..... . . . . . .. ", +"...... . . ..... . . . . . . .. . . . . . . . . ", +". . . . . . . . . . . . . . . . . . . . . . . ", +". . ..... ... . ... ... . ... . . .. .. .. . . . ", +". . ..... ... . ... ... . ... . .. . .. . .. . . ", +". . . . . . . . . . . . . . . . . . . . . . . ", +"...... . . ..... . . . . . . . . . . . . . . . . ", +". . .. ... . . . ..... . ... .... . . . . . . .. ", +". . . . . . .... . . . . . .. . . . . . . . ", +" . . . . . .. . . . . . . .. . . . . . . . ", +" ... ... ..... . ..... ... ..... ... ... .. . ..... ... . . ", +" .. ..... ....... .. ....... .... ....... ..... ..... .. ... ....... ..... .. . ", +" .... ....... ...... ... ....... ..... ....... ....... ....... .. ..... ....... ....... .. .. ", +" ...... .. .. .. .... .. ... ... .. .. .. .. .. .. .. .. .. .. .. ... ", +"... ... ... .. ..... ...... .. ... ... ... .. .. .. .. .. .. .. .. .. ... ", +".. .. .... .... ... .. ....... ...... ... ..... ....... .. .. .. .. .. .. ..... ", +"........ .... ..... .. .. .. ....... .. ..... ...... .. .. .. .. .. .. .... ", +"........ ... ... ....... .. .. .. .. ... ... ... .. .. .. .. .... .. ..... ", +".. .. .. .. .. ....... .. .. .. .. .. .. .. ... .. .. .. .. .. .. .... .. ... ", +".. .. ....... ....... .. ....... ....... .. ....... ... .. ..... ...... ...... .. ... ", +".. .. ....... ..... .. ..... ..... .. ..... ... .. ... .... ...... .. .. ", +" .. .. ....... ..... .. ..... ..... .. ..... ... ... .. .... ...... .. .. ", +" .. .. ....... ....... .. ....... ....... .. ....... ... ..... .. ...... ...... ... .. ", +" .. .. .. .. .. ....... .. .. .. .. .. .. .. ... .. .. .. .. .. .... .. ... .. ", +" ........ ... ... ....... .. .. .. .. ... ... ... .. .. .. .. .. .... ..... ", +" ........ .... ..... .. .. .. ....... .. ..... ...... .. .. .. .. .. .. .... ", +" .. .. .... .... .. ... ....... ...... ... ..... ....... .. .. .. .. .. .. ..... ", +" ... ... ... .. ..... ...... .. ... ... ... .. .. .. .. .. .. .. .. ... .. ", +" ...... .. .. .. .... .. ... ... .. .. .. .. .. .. .. .. .. .. ... .. ", +" .... ....... ...... ... ....... ..... ....... ....... ....... ..... .. ....... ....... .. .. ", +" .. ..... ....... .. ....... .... ....... ..... ..... ... .. ....... ..... . .. " +};