Qt 4.8
Classes | Functions
qscreenahi_qws.cpp File Reference
#include "qscreenahi_qws.h"
#include <QtGui/qcolor.h>
#include <QtGui/qapplication.h>
#include <QtCore/qvector.h>
#include <QtCore/qvarlengtharray.h>
#include <private/qwssignalhandler_p.h>
#include <ahi.h>

Go to the source code of this file.

Classes

class  QAhiScreenCursor
 
class  QAhiScreenPrivate
 

Functions

static int depthForPixelFormat (const AhiPixelFormat_t format)
 
static AhiPixelFormat_t pixelFormatForImageFormat (const QImage::Format format)
 

Function Documentation

◆ depthForPixelFormat()

static int depthForPixelFormat ( const AhiPixelFormat_t  format)
static

Definition at line 56 of file qscreenahi_qws.cpp.

Referenced by QAhiScreen::setMode().

57 {
58  switch (format) {
59  case AhiPix1bpp:
60  return 1;
61  case AhiPix2bpp:
62  return 2;
63  case AhiPix4bpp:
64  return 4;
65  case AhiPix8bpp_332RGB:
66  case AhiPix8bpp:
67  return 8;
68  case AhiPix16bpp_444RGB:
69  return 12;
70  case AhiPix16bpp_555RGB:
71  return 15;
72  case AhiPix16bpp_565RGB:
73  return 16;
74  case AhiPix32bpp_8888ARGB:
75  case AhiPix32bpp_8888BGRA:
76  return 32;
77  default:
78  return 0;
79  }
80 }

◆ pixelFormatForImageFormat()

static AhiPixelFormat_t pixelFormatForImageFormat ( const QImage::Format  format)
static

Definition at line 82 of file qscreenahi_qws.cpp.

Referenced by QAhiScreen::blit(), and QAhiScreenCursor::set().

83 {
84  switch (format) {
87  return AhiPix1bpp;
89  return AhiPix8bpp;
93  return AhiPix32bpp_8888ARGB;
95  return AhiPix16bpp_565RGB;
97  return AhiPix16bpp_555RGB;
100  return AhiPix16bpp_444RGB;
101  default:
102  return AhiPixelFormatMax;
103  }
104 }