2 * Copyright (c) 2000, 2001 Greg Haerr <greg@censoft.com>
4 * Portrait mode subdriver for Microwindows
13 fbportrait_drawpixel(PSD psd,MWCOORD x, MWCOORD y, MWPIXELVAL c)
15 psd->orgsubdriver->DrawPixel(psd, y, psd->xvirtres-x-1, c);
19 fbportrait_readpixel(PSD psd,MWCOORD x, MWCOORD y)
21 return psd->orgsubdriver->ReadPixel(psd, y, psd->xvirtres-x-1);
25 fbportrait_drawhorzline(PSD psd,MWCOORD x1, MWCOORD x2, MWCOORD y, MWPIXELVAL c)
27 psd->orgsubdriver->DrawVertLine(psd, y, psd->xvirtres-x2-1,
28 psd->xvirtres-x1-1, c);
31 * Uncomment the following if driver doesn't support hline
32 x2 = psd->xvirtres-x2-1;
33 while(x2 <= (psd->xvirtres-x1-1))
34 fb_drawpixel(psd, y, x2++, c);
39 fbportrait_drawvertline(PSD psd,MWCOORD x, MWCOORD y1, MWCOORD y2, MWPIXELVAL c)
41 psd->orgsubdriver->DrawHorzLine(psd, y1, y2, psd->xvirtres-x-1, c);
44 * Uncomment the following if driver doesn't support vline
46 fb_drawpixel(psd, y1++, psd->xvirtres-x-1, c);
51 fbportrait_fillrect(PSD psd,MWCOORD x1, MWCOORD y1, MWCOORD x2, MWCOORD y2,
54 x1 = psd->xvirtres-x1-1;
55 x2 = psd->xvirtres-x2-1;
57 psd->orgsubdriver->DrawHorzLine(psd, y1, y2, x2++, c);
61 fbportrait_blit(PSD dstpsd,MWCOORD destx,MWCOORD desty,MWCOORD w,MWCOORD h,
62 PSD srcpsd, MWCOORD srcx,MWCOORD srcy,long op)
64 dstpsd->orgsubdriver->Blit(dstpsd, desty, dstpsd->xvirtres-destx-w,
65 h, w, srcpsd, srcy, srcpsd->xvirtres-srcx-w, op);
69 fbportrait_stretchblit(PSD dstpsd, MWCOORD destx, MWCOORD desty, MWCOORD dstw,
70 MWCOORD dsth, PSD srcpsd, MWCOORD srcx, MWCOORD srcy, MWCOORD srcw,
71 MWCOORD srch, long op)
73 //dstpsd->orgsubdriver->StretchBlit(dstpsd, desty, dstpsd->xvirtres-destx-dstw,
74 //dsth, dstw, srcpsd, srcy, srcpsd->xvirtres-srcx-srcw,
78 SUBDRIVER fbportrait_left = {
82 fbportrait_drawhorzline,
83 fbportrait_drawvertline,
87 fbportrait_stretchblit