int DrawInfoBox(Graphics & g,DrawFlags flags,int state,AlphaComponent alpha) { Rect rc(10,30,550,30); static const char * szFuncs [] = { "DrawFast", "Draw", "Draw + Clip Source", "DrawStretch", "DrawStretch + Clip Source", "DrawRotate", }; g.DrawRoundRectFill(rc, 5,Color(45,10,200,200)); g.DrawRoundRect(rc, 5,Color(45,10,200)); g.DrawText(Point(15,40),szFuncs[state],Color(255,255,0,200)); long lastpos = strlen(szFuncs[state])*8; if(flags.HasFlag(DrawFlags::horizontalFlip) && state > 0) { g.DrawText(Point(15 + lastpos,40)," + flipH",Color(255,255,0,200)); lastpos += 8*8; } if(flags.HasFlag(DrawFlags::verticalFlip) && state > 0) { g.DrawText(Point(15 + lastpos,40)," + flipV",Color(255,255,0,200)); lastpos += 8*8; } if(flags.HasFlag(DrawFlags::noAntiAlias) && state > 2) { g.DrawText(Point(15 + lastpos,40)," + noAntiAlias",Color(255,255,0,200)); lastpos += 14*8; } if(alpha < 255 && state > 0) { char szAlpha[20]; sprintf(szAlpha," (alpha %d)",alpha); g.DrawText(Point(15 + lastpos,40),szAlpha,Color(150,255,0,210)); lastpos += strlen(szAlpha)*8; } return 0; }