NPRG

 view release on metacpan or  search on metacpan

Wingraph.xs  view on Meta::CPAN

     RETVAL=CreateHatchBrush(style,clr);
   OUTPUT:
     RETVAL


HGDIOBJ
xsGetStockObject(index)
    int index;
   CODE:
    RETVAL=GetStockObject(index);
   OUTPUT:
    RETVAL

int 
xsFillRect(dc,x1,y1,x2,y2,br)
    HDC dc;
    int x1;
    int y1;
    int x2;
    int y2;
    HBRUSH br;
  CODE:
         RECT rc;
         HDC hdc;
         rc.left=x1;
         rc.top=y1;
         rc.right=x2;
         rc.bottom=y2;
         RETVAL=FillRect(dc,&rc,br);
   OUTPUT:
     RETVAL

int 
xsGetTextExtentPoint32(dc,s,cx,cy)
         HDC dc;
         char *s;
         int cx;
         int cy;
      CODE:
       SIZE sz;
       int rv;
       rv=GetTextExtentPoint32(dc,s,strlen(s),&sz);
       RETVAL=rv;
       if(rv){
          cx=sz.cx;
          cy=sz.cy;
       }
     OUTPUT:
       cx
       cy
       RETVAL

int
xsGetTextExtent(dc,s)
    HDC dc;
    char *s;
  PREINIT:
   SIZE sz;
   int rv;
   long x,y;
  PPCODE:
   rv=GetTextExtentPoint32(dc,s,strlen(s),&sz);
   EXTEND(sp,2);
   PUSHs(sv_2mortal(newSViv(sz.cx)));
   PUSHs(sv_2mortal(newSViv(sz.cy)));

COLORREF
xsRGB(r,g,b)
     int r;
     int g;
     int b;
    CODE:
      long rgb;
      rgb =rgbthunk(r,g,b);
      RETVAL=rgb;
    OUTPUT:
      RETVAL

void
xsClipBSize(dc,x,y)
      HDC dc;
      int x;
      int y;
     CODE:
       RECT rc;
       GetClipBox(dc,&rc);
       x=rc.right-rc.left;
       y=rc.bottom-rc.top;
     OUTPUT:
       x
       y

int
PointToSize(dc,PointSize)
          HDC dc;
          int PointSize;
       CODE:
          RETVAL = -MulDiv(PointSize, GetDeviceCaps(dc, LOGPIXELSY), 72);
       OUTPUT:
          RETVAL

HBRUSH
xsGetCurrentBrush(dc)
          HDC dc;
        CODE:
          RETVAL=GetCurrentObject(dc,OBJ_BRUSH);
        OUTPUT:
          RETVAL

HDC
xsSetDocumetProperties(device, orient, papersize)
          char *device;
          int orient;
          int papersize;
        PREINIT:
         DEVMODE *dm;
         int dmsize;
         HANDLE printer;

        CODE:
         if(!OpenPrinter(device, &printer, NULL)){



( run in 0.372 second using v1.01-cache-2.11-cpan-5511b514fd6 )