Krita Source Code Documentation
Loading...
Searching...
No Matches
kis_texture_tile.cpp File Reference
#include "kis_texture_tile.h"
#include "kis_texture_tile_update_info.h"
#include "KisOpenGLBufferCircularStorage.h"
#include <kis_debug.h>
#include <QOpenGLBuffer>

Go to the source code of this file.

Macros

#define GL_BGRA   0x814F
 
#define GL_GLEXT_PROTOTYPES
 
#define GL_RGBA16_EXT   0x805B
 

Functions

QRectF relativeRect (const QRect &br, const QRect &cr, const KisGLTexturesInfo *texturesInfo)
 

Macro Definition Documentation

◆ GL_BGRA

#define GL_BGRA   0x814F

Definition at line 18 of file kis_texture_tile.cpp.

◆ GL_GLEXT_PROTOTYPES

#define GL_GLEXT_PROTOTYPES

Definition at line 7 of file kis_texture_tile.cpp.

◆ GL_RGBA16_EXT

#define GL_RGBA16_EXT   0x805B

Definition at line 22 of file kis_texture_tile.cpp.

Function Documentation

◆ relativeRect()

QRectF relativeRect ( const QRect & br,
const QRect & cr,
const KisGLTexturesInfo * texturesInfo )
inline

Definition at line 58 of file kis_texture_tile.cpp.

61{
62 const qreal x = qreal(cr.x() - br.x()) / texturesInfo->width;
63 const qreal y = qreal(cr.y() - br.y()) / texturesInfo->height;
64 const qreal w = qreal(cr.width()) / texturesInfo->width;
65 const qreal h = qreal(cr.height()) / texturesInfo->height;
66
67 return QRectF(x, y, w, h);
68}

References KisGLTexturesInfo::height, and KisGLTexturesInfo::width.