~vcs-imports/libwmf/main

« back to all changes in this revision

Viewing changes to Xwmfapi.c

  • Committer: vivien
  • Date: 2000-10-16 00:25:42 UTC
  • Revision ID: Arch-1:libwmf@bazaar.ubuntu.com%libwmf--MAIN--0--patch-42
*** empty log message ***

Show diffs side-by-side

added added

removed removed

Lines of Context:
396
396
                        }
397
397
        for(pXr = pXrect; pRect < pEndRect; pRect++, pXr++)
398
398
                {
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);
403
 
 
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);
 
403
                  else
 
404
                    pXr->x = NormX(pRect->right,cstruct);
 
405
 
 
406
                  if (NormY(pRect->top,cstruct)<=NormY(pRect->bottom,cstruct))
 
407
                    pXr->y = NormY(pRect->top,cstruct);
 
408
                  else
 
409
                    pXr->y = NormY(pRect->bottom,cstruct);
 
410
                  
 
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));
 
414
 
 
415
 
 
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);
406
418
                }
407
419
        }
408
420
    else
486
498
        }
487
499
 
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)
490
502
        {
491
503
        XCharStruct charstuff;
492
504
        int dummy;
931
943
 
932
944
        
933
945
void Xdraw_rectangle(CSTRUCT *cstruct,WMFRECORD *wmfrecord)
934
 
        {
935
 
        XGCValues val,oldval;
 
946
{
 
947
  XGCValues val,oldval;
 
948
 
 
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 */
 
958
/*        ); */
 
959
 
 
960
 
936
961
        if ((cstruct->dc->brush!=NULL) && (cstruct->dc->brush->lbStyle != BS_NULL))
937
962
                {
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]);