wxWidgets/samples/image/image.bkl
Vadim Zeitlin c3f641cb5e Add wxBITMAP_PNG() macro similar to wxBITMAP() but for PNG images.
Just as wxBITMAP() provides a portable way of loading bitmaps from either
Windows BMP resources or embedded XPM data depending on the platform,
wxBITMAP_PNG() hides the difference between loading bitmaps from PNG resources
under Windows and embedded PNG data elsewhere.

Also add wxBITMAP_PNG_FROM_DATA() macro which always loads PNG data from
memory: it's needed anyhow as part of wxBITMAP_PNG() implementation and some
people may prefer to always use it under all platforms.

Finally modify the image sample to demonstrate loading PNG images from both
resources and memory. This involved creation of a new Windows .rc file for it
and copying its data files to Resources bundle directory under OS X.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72477 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-09-13 17:15:25 +00:00

31 lines
896 B
XML

<?xml version="1.0" ?>
<!-- $Id$ -->
<makefile>
<!--
This file is loaded using wxBITMAP_TYPE_PNG_RESOURCE and so must be
copied to the resources directory under Mac.
-->
<set var="BUNDLE_RESOURCES">$(SRCDIR)/cursor.png</set>
<include file="../../build/bakefiles/common_samples.bkl"/>
<exe id="image" template="wx_sample" template_append="wx_append">
<sources>image.cpp canvas.cpp</sources>
<headers>canvas.h</headers>
<wx-lib>core</wx-lib>
<wx-lib>base</wx-lib>
<win32-res>image.rc</win32-res>
</exe>
<wx-data id="data">
<files>
horse.png horse.jpg horse.bmp horse.gif horse.pcx horse.pnm horse_ag.pnm horse_rg.pnm
horse.tif horse.tga horse.xpm horse.cur horse.ico horse3.ani
smile.xbm toucan.png cmyk.jpg cursor.png
</files>
</wx-data>
</makefile>