void fill(const gRegion &area);
void clear();
-
+
+ enum
+ {
+ BT_ALPHATEST = 1
+ };
+
void blit(gPixmap *pixmap, ePoint pos, const eRect &what=eRect(), int flags=0);
void setPalette(gRGB *colors, int start=0, int len=256);
#include <lib/gdi/epng.h>
#include <lib/gui/ewidgetdesktop.h>
-ePixmap::ePixmap(eWidget *parent): eWidget(parent)
+ePixmap::ePixmap(eWidget *parent)
+ :eWidget(parent), m_alphatest(false)
{
}
+void ePixmap::setAlphatest(bool alphatest)
+{
+ m_alphatest = alphatest;
+}
+
void ePixmap::setPixmap(gPixmap *pixmap)
{
m_pixmap = pixmap;
gPainter &painter = *(gPainter*)data2;
if (m_pixmap)
- painter.blit(m_pixmap, ePoint(0, 0));
+ painter.blit(m_pixmap, ePoint(0, 0), eRect(), m_alphatest?gPainter::BT_ALPHATEST:0);
return 0;
}
class ePixmap: public eWidget
{
+ bool m_alphatest;
public:
ePixmap(eWidget *parent);
void setPixmap(gPixmap *pixmap);
void setPixmapFromFile(const char *filename);
+ void setAlphatest(bool alphatest);
protected:
ePtr<gPixmap> m_pixmap;
int event(int event, void *data=0, void *data2=0);
desktop.makeCompatiblePixmap(ptr)
guiObject.setPixmap(ptr)
# guiObject.setPixmapFromFile(value)
+ elif attrib == "alphatest": # used by ePixmap
+ guiObject.setAlphatest(
+ { "on": True,
+ "off": False
+ }[value])
elif attrib == "orientation": # used by eSlider
try:
guiObject.setOrientation(