Hi!
I have created a small IUP+CD program which draws a box sith a stipple
pattern. Code attached below. It seems that CD_TRANSPARENT does not work for
back opacity using stipples (?). For Hatches it works as expected.
/* Robert.P., Sweden */
//CODE START
#include <cd.h>
#include <cdpdf.h>
#include <iup.h>
#include <cdiup.h>
static cdCanvas* cdcanvas;
static unsigned char stip[]= {
1,1,0,0,0,0,
1,1,0,0,0,0,
0,0,0,0,0,0,
0,0,0,0,0,0,
0,0,0,0,0,0,
0,0,0,0,0,0
};
int canvasaction(Ihandle* ih) {
cdCanvasActivate(cdcanvas);
//draw a see-through line
cdCanvasForeground(cdcanvas,0xff0000);
cdCanvasLine(cdcanvas,0,0,200,200);
//draw a test rectangle
cdCanvasBackground(cdcanvas,0xffff00);
cdCanvasForeground(cdcanvas,0x00);
cdCanvasBackOpacity(cdcanvas,CD_TRANSPARENT);
cdCanvasStipple(cdcanvas,6,6,stip);
cdCanvasBox(cdcanvas,50,200,50,200);
return IUP_DEFAULT;
}
int main()
{
IupOpen(0,0);
Ihandle* canvas;
Ihandle* dlg=IupDialog(canvas=IupCanvas(0));
IupSetAttribute(canvas,"RASTERSIZE","500x500");
IupSetCallback(canvas,"ACTION",canvasaction);
IupMap(dlg);
cdcanvas=cdCreateCanvas(CD_IUP,canvas);
IupShow(dlg);
IupMainLoop();
IupClose();
return 0;
}
//END
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Iup-users mailing list
Iup-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/iup-users