Bonjour, j'aurais besoin d'aide pour accélérer un peu ma fonction, qui consiste à dessiner une cible de darts... elle marche tès bien, elle est juste trop lente... la voici:
void DrawTarget(short x1,short y1,short radius)
{
SCR_RECT rect;
rect.xy.x0 = 0;
rect.xy.y0 = 0;
rect.xy.x1 = 159;
rect.xy.y1 = 99;
//Concentric circles:
DrawClipEllipse(x1,y1,(radius/20),(radius/20),&rect,A_NORMAL);
DrawClipEllipse(x1,y1,(radius/8),(radius/8),&rect,A_NORMAL);
DrawClipEllipse(x1,y1,(radius/2),(radius/2),&rect,A_NORMAL);
DrawClipEllipse(x1,y1,((radius/2)+(radius/8)),((radius/2)+(radius/8)),&rect,A_NORMAL);
DrawClipEllipse(x1,y1,(radius-(radius/8)),(radius-(radius/8)),&rect,A_NORMAL);
DrawClipEllipse(x1,y1,radius,radius,&rect,A_NORMAL);
//Lines:
float angle;
for(angle=PI/20;angle<2*PI;angle=angle + PI/10)
{
DrawLine(((radius/8)*sin(angle)+x1),((radius/8)*cos(angle)+y1),((radius)*sin(angle)+x1),((radius)*cos(angle)+y1),A_NORMAL);
}
}
et avec 50,50,45 comme arguments, ça donne ceci:
[URL=http://imageshack.us][IMG]http://img205.imageshack.us/img205/8021/screen5mq.png[/IMG][/URL]
quelqu'un pourrait m'aider?