Subversion Repositories wimsdev

Rev

Rev 18318 | Rev 18325 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18318 Rev 18320
Line 746... Line 746...
746
{
746
{
747
  int i,nb;
747
  int i,nb;
748
  double dt, r=rx>ry?rx:ry;
748
  double dt, r=rx>ry?rx:ry;
749
  t2-=t1;
749
  t2-=t1;
750
  t2-=360*floor(t2/360);
750
  t2-=360*floor(t2/360);
-
 
751
  if(t2<1) t2=360;
751
  t1*=DEG;t2*=DEG;
752
  t1*=DEG;t2*=DEG;
752
  nb = r*t2/3;
753
  nb = r*t2/3;
753
  dt = t2/nb;
754
  dt = t2/nb;
754
  for (i=0; i<nb; ++i,t1+=dt)
755
  for (i=0; i<nb; ++i,t1+=dt)
755
    gdImageLine(im,cx+rx*cos(t1),cy+ry*sin(t1),
756
    gdImageLine(im,cx+rx*cos(t1),cy+ry*sin(t1),
Line 778... Line 779...
778
                     0.5*pm->pd[2],0.5*pm->pd[3],pm->pd[4],pm->pd[5]);
779
                     0.5*pm->pd[2],0.5*pm->pd[3],pm->pd[4],pm->pd[5]);
779
}
780
}
780
 
781
 
781
void obj_angle(objparm *pm)
782
void obj_angle(objparm *pm)
782
{
783
{
783
  const double DEG=M_PI/180;
784
/* dans la doc: mettre les angles dans l'ordre ???? demander qu'ils soient entre 0 et 360 */
784
  double dpts[6];
785
  double dpts[6];
785
  int pts[6], wx=rint(2*pm->pd[2]*xscale), wy=rint(2*pm->pd[2]*yscale);
786
  int pts[6], wx=rint(2*pm->pd[2]*xscale), wy=rint(2*pm->pd[2]*yscale);
786
  dpts[0]=pm->pd[0];
787
  dpts[0]=pm->pd[0];
787
  dpts[1]=pm->pd[1];
788
  dpts[1]=pm->pd[1];
788
  dpts[2]=pm->pd[0]+pm->pd[2]*cos(DEG*pm->pd[3]);
789
  dpts[2]=pm->pd[0]+pm->pd[2]*cos(DEG*pm->pd[3]);