QSFML
Public Member Functions | List of all members
qsf::Image Class Reference

sf::Image ↔ QImage compatibility layer More...

#include <Image.hpp>

Inheritance diagram for qsf::Image:
Inheritance graph
[legend]

Public Member Functions

 Image ()
 Default constructor. More...
 
 Image (const QImage &qImg)
 Constructor taking reference to QImage. More...
 
QImage asQImage ()
 Converts to QImage. More...
 
void loadFromQImage (const QImage &qImg)
 Load image from QImage. More...
 

Detailed Description

sf::Image ↔ QImage compatibility layer

Very simple class that inherits sf::Image. Its only additional purpose is being able to create QImage and to be loaded from such.

Constructor & Destructor Documentation

qsf::Image::Image ( )

Default constructor.

Calls sf::Image's default constructor.

qsf::Image::Image ( const QImage &  qImg)

Constructor taking reference to QImage.

Parameters
[in]qImg– const reference to QImage

Calls loadFromQImage(img) to create qsf::Image.

Member Function Documentation

QImage qsf::Image::asQImage ( )

Converts to QImage.

Creates QImage using sf::Image data, way faster than creating qsf::Image from QImage, as sf::Image always uses RGBA8888 format.

void qsf::Image::loadFromQImage ( const QImage &  qImg)

Load image from QImage.

Parameters
[in]qImg– const reference to QImage

Creates qsf::Image using QImage's data, slow as it has to copy QImage (to ensure, that it has proper format) and then copies it again into sf::Image backend.


The documentation for this class was generated from the following files: