Louvre  v1.2.1-2
C++ library for Wayland compositors
List of all members | Public Attributes
LPainter::TextureParams Struct Reference

#include <LPainter.h>

Parameters required for bindTextureMode(). More...

Detailed Description

Parameters required for bindTextureMode().

This struct provides all the necessary parameters to map a texture into the current destination framebuffer.

Public Attributes

const LTexturetexture
 Texture to be drawn. More...
 
LPoint pos
 Position of the texture (destination rect) in global compositor coordinates. More...
 
LRectF srcRect
 Subrect of the texture to be mapped in surface coordinates with fractional values. More...
 
LSize dstSize
 Destination size of the source rect in surface coordinates. More...
 
LFramebuffer::Transform srcTransform = LFramebuffer::Normal
 Transform applied to the texture. More...
 
Float32 srcScale = 1.f
 Scale factor of the texture. More...
 

Member Data Documentation

◆ texture

const LTexture* texture

Texture to be drawn.

◆ pos

LPoint pos

Position of the texture (destination rect) in global compositor coordinates.

◆ srcRect

LRectF srcRect

Subrect of the texture to be mapped in surface coordinates with fractional values.

Coordinates should be specified in the space generated after applying the scale factor and transformation to the texture buffer.

◆ dstSize

LSize dstSize

Destination size of the source rect in surface coordinates.

◆ srcTransform

Transform applied to the texture.

For example, if the texture is rotated 90 degrees counterclockwise, use LFramebuffer::Rotated90. LPainter will apply the inverse transform (LFramebuffer::Rotated270).

◆ srcScale

Float32 srcScale = 1.f

Scale factor of the texture.