/[qemacs]/qemacs/cfb.c
ViewVC logotype

Diff of /qemacs/cfb.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1.1.1 by bellard, Sat May 29 10:18:53 2004 UTC revision 1.2 by chqrlie, Wed May 11 15:49:36 2005 UTC
# Line 59  static void cfb16_fill_rectangle(QEditSc Line 59  static void cfb16_fill_rectangle(QEditSc
59      dest = cfb->base + y1 * cfb->wrap + x1 * 2;      dest = cfb->base + y1 * cfb->wrap + x1 * 2;
60      if (color == QECOLOR_XOR) {      if (color == QECOLOR_XOR) {
61          /* XXX: suppress this mess */          /* XXX: suppress this mess */
62          for(y=0;y<h;y++) {          for (y = 0; y < h; y++) {
63              d = dest;              d = dest;
64              for(n = w; n != 0; n--) {              for (n = w; n != 0; n--) {
65                  ((short *)d)[0] ^= 0xffff;                  ((short *)d)[0] ^= 0xffff;
66                  d += 2;                  d += 2;
67              }              }
68              dest += cfb->wrap;              dest += cfb->wrap;
69          }          }
70      } else {      } else {
71          for(y=0;y<h;y++) {          for (y = 0; y < h; y++) {
72              d = dest;              d = dest;
73              n = w;              n = w;
74                            
# Line 108  static void cfb32_fill_rectangle(QEditSc Line 108  static void cfb32_fill_rectangle(QEditSc
108      dest = cfb->base + y1 * cfb->wrap + x1 * 4;      dest = cfb->base + y1 * cfb->wrap + x1 * 4;
109      if (color == QECOLOR_XOR) {      if (color == QECOLOR_XOR) {
110          /* XXX: suppress this mess */          /* XXX: suppress this mess */
111          for(y=0;y<h;y++) {          for (y = 0; y < h; y++) {
112              d = dest;              d = dest;
113              for(n = w; n != 0; n--) {              for (n = w; n != 0; n--) {
114                  ((short *)d)[0] ^= 0x00ffffff;                  ((short *)d)[0] ^= 0x00ffffff;
115                  d += 4;                  d += 4;
116              }              }
117              dest += cfb->wrap;              dest += cfb->wrap;
118          }          }
119      } else {      } else {
120          for(y=0;y<h;y++) {          for (y = 0; y < h; y++) {
121              d = dest;              d = dest;
122              n = w;              n = w;
123              while (n >= 4) {              while (n >= 4) {
# Line 312  int cfb_init(QEditScreen *s, Line 312  int cfb_init(QEditScreen *s,
312      cfb->depth = depth;      cfb->depth = depth;
313      cfb->bpp = (depth + 7) / 8;      cfb->bpp = (depth + 7) / 8;
314            
315      switch(depth) {      switch (depth) {
316      case 15:      case 15:
317          cfb->get_color = cfb15_get_color;          cfb->get_color = cfb15_get_color;
318          break;          break;
# Line 325  int cfb_init(QEditScreen *s, Line 325  int cfb_init(QEditScreen *s,
325          break;          break;
326      }      }
327    
328      switch(cfb->bpp) {      switch (cfb->bpp) {
329      case 2:      case 2:
330          s->dpy.dpy_fill_rectangle = cfb16_fill_rectangle;          s->dpy.dpy_fill_rectangle = cfb16_fill_rectangle;
331          cfb->draw_glyph = cfb16_draw_glyph;          cfb->draw_glyph = cfb16_draw_glyph;

Legend:
Removed from v.1.1.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26