Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qxbmhandler.cpp File Reference
#include <qplatformdefs.h>
#include "private/qxbmhandler_p.h"
#include <qimage.h>
#include <qiodevice.h>
#include <qloggingcategory.h>
#include <qvariant.h>
#include <private/qtools_p.h>
#include <stdio.h>
+ Include dependency graph for qxbmhandler.cpp:

Go to the source code of this file.

Functions

static int hex2byte (char *p)
 
static bool read_xbm_header (QIODevice *device, int &w, int &h)
 
static bool read_xbm_body (QIODevice *device, int w, int h, QImage *outImage)
 
static bool read_xbm_image (QIODevice *device, QImage *outImage)
 
static bool write_xbm_image (const QImage &sourceImage, QIODevice *device, const QString &fileName)
 

Function Documentation

◆ hex2byte()

static int hex2byte ( char *  p)
inlinestatic

Definition at line 27 of file qxbmhandler.cpp.

References QtMiscUtils::fromHex().

Referenced by read_xbm_body().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read_xbm_body()

static bool read_xbm_body ( QIODevice device,
int  w,
int  h,
QImage outImage 
)
static

Definition at line 96 of file qxbmhandler.cpp.

References QImageIOHandler::allocateImage(), Qt::color0, device, QImage::fill(), QImage::Format_MonoLSB, hex2byte(), qRgb(), QImage::scanLine(), QImage::setColor(), and QImage::setColorCount().

Referenced by QXbmHandler::read(), and read_xbm_image().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read_xbm_header()

static bool read_xbm_header ( QIODevice device,
int &  w,
int &  h 
)
static

Definition at line 32 of file qxbmhandler.cpp.

References ch, device, QtMiscUtils::isAsciiLetterOrNumber(), and QByteArray::toInt().

Referenced by read_xbm_image().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ read_xbm_image()

static bool read_xbm_image ( QIODevice device,
QImage outImage 
)
static

Definition at line 152 of file qxbmhandler.cpp.

References device, read_xbm_body(), and read_xbm_header().

Referenced by QXbmHandler::canRead().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ write_xbm_image()

static bool write_xbm_image ( const QImage sourceImage,
QIODevice device,
const QString fileName 
)
static

Definition at line 160 of file qxbmhandler.cpp.

References device, fileName, QImage::Format_MonoLSB, i, qGray(), qsnprintf(), and qstrlen().

Referenced by QXbmHandler::write().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: