Subversion Repositories wimsdev

Rev

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

Rev 1122 Rev 1139
Line 216... Line 216...
216
    scale2(pm->pd[4],pm->pd[5],&xv,&yv);
216
    scale2(pm->pd[4],pm->pd[5],&xv,&yv);
217
    for(i=0;i<n;i++) {
217
    for(i=0;i<n;i++) {
218
        xi=rint(i*xv); yi=rint(i*yv);
218
        xi=rint(i*xv); yi=rint(i*yv);
219
        gdImageLine(image,pm->p[0]+xi,pm->p[1]+yi,pm->p[2]+xi,pm->p[3]+yi,
219
        gdImageLine(image,pm->p[0]+xi,pm->p[1]+yi,pm->p[2]+xi,pm->p[3]+yi,
220
                    pm->color[0]);
220
                    pm->color[0]);
221
        if(vimg_enable) vimg_line(scale_buf[0]+i*scale_buf[4],scale_buf[1]+i*scale_buf[5],
221
        if(vimg_enable) vimg_line(scale_buf[0]+i*(scale_buf[4]-transx),
-
 
222
                                  scale_buf[1]+i*(scale_buf[5]-transy),
222
                                  scale_buf[2]+i*scale_buf[4],scale_buf[3]+i*scale_buf[5]);
223
                                  scale_buf[2]+i*(scale_buf[4]-transx),
-
 
224
                                  scale_buf[3]+i*(scale_buf[5]-transy));
223
    }
225
    }
224
}
226
}
225
 
227
 
226
        /* rectangle */
228
        /* rectangle */
227
void obj_rect(objparm *pm)
229
void obj_rect(objparm *pm)
Line 294... Line 296...
294
void obj_lines(objparm *pm)
296
void obj_lines(objparm *pm)
295
{
297
{
296
    int i, n;
298
    int i, n;
297
    n=(pm->pcnt)/2;
299
    n=(pm->pcnt)/2;
298
    scale(pm->pd,pm->p,n);
300
    scale(pm->pd,pm->p,n);
299
    for(i=2;i<2*n;i+=2)
301
    for(i=2;i<2*n;i+=2)
300
      gdImageLine(image,pm->p[i-2],pm->p[i-1],pm->p[i],pm->p[i+1],pm->color[0]);
302
      gdImageLine(image,pm->p[i-2],pm->p[i-1],pm->p[i],pm->p[i+1],pm->color[0]);
301
    if(vimg_enable) vimg_polyline(scale_buf,n,0);
303
    if(vimg_enable) vimg_polyline(scale_buf,n,0);
302
}
304
}
303
 
305
 
304
        /* segments */
306
        /* segments */