397
397
for(pXr = pXrect; pRect < pEndRect; pRect++, pXr++)
399
pXr->x = NormX(pRect->left,cstruct);
400
pXr->y = NormY(pRect->top,cstruct);
401
pXr->width = ScaleX(pRect->right - pRect->left,cstruct);
402
pXr->height = ScaleY(pRect->bottom - pRect->top,cstruct);
404
wmfdebug(stderr,"clipping rect set to %d %d %d %d\n",
405
pXr->x,pXr->y,pXr->x+pXr->width,pXr->y+pXr->height);
399
/* As the clipping rects are not always stored in
400
the right order, we test... */
401
if (NormX(pRect->left,cstruct)<=NormX(pRect->right,cstruct))
402
pXr->x = NormX(pRect->left,cstruct);
404
pXr->x = NormX(pRect->right,cstruct);
406
if (NormY(pRect->top,cstruct)<=NormY(pRect->bottom,cstruct))
407
pXr->y = NormY(pRect->top,cstruct);
409
pXr->y = NormY(pRect->bottom,cstruct);
411
/* The "abs" are in case, one day we remove them from ScaleX... */
412
pXr->width = abs(ScaleX(pRect->right - pRect->left,cstruct));
413
pXr->height = abs(ScaleY(pRect->bottom - pRect->top,cstruct));
416
wmfdebug(stderr,"clipping rect set to %d %d %d %d\n",
417
pXr->x,pXr->y,pXr->x+pXr->width,pXr->y+pXr->height);
488
500
/*void Xdraw_text(CSTRUCT *cstruct,char *str,WMFRECORD *wmfrecord,U16 *lpDx)*/
489
void Xdraw_text(CSTRUCT *cstruct,char *str,RECT *arect,U16 flags,U16 *lpDx,S16 x,S16 y)
501
void Xdraw_text(CSTRUCT *cstruct,char *str,RECT *arect,U16 flags,U16 *lpDx,int x,int y)
491
503
XCharStruct charstuff;
933
945
void Xdraw_rectangle(CSTRUCT *cstruct,WMFRECORD *wmfrecord)
935
XGCValues val,oldval;
947
XGCValues val,oldval;
949
/* fprintf(stderr,"Rectangle: (%d,%d)+(%d,%d) from (%d,%d)*(%d,%d) by %f,%f in %f,%f\n", */
950
/* NormX(wmfrecord->Parameters[3],cstruct), */
951
/* NormY(wmfrecord->Parameters[2],cstruct), */
952
/* NormX(wmfrecord->Parameters[1],cstruct), */
953
/* NormY(wmfrecord->Parameters[0],cstruct), */
954
/* wmfrecord->Parameters[3],wmfrecord->Parameters[2], */
955
/* wmfrecord->Parameters[1],wmfrecord->Parameters[0], */
956
/* cstruct->xpixeling,cstruct->ypixeling, */
957
/* cstruct->realwidth,cstruct->realheight */
936
961
if ((cstruct->dc->brush!=NULL) && (cstruct->dc->brush->lbStyle != BS_NULL))
938
963
wmfdebug(stderr,"style is %d, code is %x %x %x %x\n",cstruct->dc->brush->lbStyle,wmfrecord->Parameters[0],wmfrecord->Parameters[1],wmfrecord->Parameters[2],wmfrecord->Parameters[3]);