Example #1
0
static void
directfb_draw_bitmaps (struct graphics_device *gd, struct bitmap **bmps,
                       int n, int x, int y)
{
  DFBDeviceData *data = gd->driver_data;
  struct bitmap *bmp  = *bmps;
  int x1 = x;
  int h  = 0;

  if (n < 1)
    return;

  do
    {
      IDirectFBSurface *src = bmp->flags;

      data->surface->Blit (data->surface, src, NULL, x, y);

      if (h < bmp->y)
        h = bmp->y;

      x += bmp->x;
      bmp++;
    }
  while (--n);

  directfb_register_flip (data, x1, y, x - x1, h);
}
Example #2
0
static void
directfb_draw_bitmap (struct graphics_device *gd, struct bitmap *bmp,
                      int x, int y)
{
  DFBDeviceData    *data = gd->driver_data;
  IDirectFBSurface *src  = bmp->flags;

  data->surface->Blit (data->surface, src, NULL, x, y);

  directfb_register_flip (data, x, y, bmp->x, bmp->y);
}
static void
directfb_fill_area (struct graphics_device *gd,
                    int x1, int y1, int x2, int y2, long color)
{
  DFBDeviceData *data = gd->driver_data;
  int w = x2 - x1;
  int h = y2 - y1;

  directfb_set_color (data->surface, color);
  data->surface->FillRectangle (data->surface, x1, y1, w, h);

  directfb_register_flip (data, x1, y1, w, h);
}
Example #4
0
static void
directfb_draw_vline (struct graphics_device *gd,
                     int x, int top, int bottom, long color)
{
  DFBDeviceData *data = gd->driver_data;

  bottom--;

  directfb_set_color (data->surface, color);
  data->surface->DrawLine (data->surface, x, top, x, bottom);

  directfb_register_flip (data, x, top, 1, bottom - top);
}
Example #5
0
static void
directfb_draw_hline (struct graphics_device *gd,
                     int left, int y, int right, long color)
{
  DFBDeviceData *data = gd->driver_data;

  right--;

  directfb_set_color (data->surface, color);
  data->surface->DrawLine (data->surface, left, y, right, y);

  directfb_register_flip (data, left, y, right - left, 1);
}
static int
directfb_vscroll (struct graphics_device *gd, struct rect_set **set, int sc)
{
  DFBDeviceData *data = gd->driver_data;
  DFBRectangle   rect;

  *set = NULL;
  if (!sc)
    return 0;

  rect.x = gd->clip.x1;
  rect.y = gd->clip.y1;
  rect.w = gd->clip.x2 - rect.x;
  rect.h = gd->clip.y2 - rect.y;

  data->surface->Blit (data->surface,
                       data->surface, &rect, rect.x, rect.y + sc);

  directfb_register_flip (data, rect.x, rect.y, rect.w, rect.h);

  return 1;
}