Kanzi 4.0.0
kanzi::FramebufferGraphicsOutput Class Referenceabstract

FramebufferGraphicsOutput class. More...

#include <kanzi/platform/graphics/framebuffer_graphics_output.hpp>

Inheritance diagram for kanzi::FramebufferGraphicsOutput:
[legend]

Public Member Functions

 FramebufferGraphicsOutput () noexcept
 Constructor.
 
template<typename FramebufferT , typename = enable_if_t<is_base_of_v<FramebufferBase, FramebufferT>>>
KZ_NO_DISCARD FramebufferTgetFramebuffer () const noexcept
 Returns the framebuffer for the graphics output.
 
template<typename FramebufferT , typename >
FramebufferTgetFramebuffer () const noexcept
 
virtual KZ_NO_DISCARD uintptr_t getNativeFramebufferHandle (platform::APIBackend backend) const noexcept=0
 Gets native framebuffer handle.
 
virtual KZ_NO_DISCARD Matrix4x4 getTargetTransformation () const noexcept=0
 Returns the target transformation.
 
void invalidate () noexcept
 Invalidates underlying framebuffer.
 
void setFramebuffer (unique_ptr< FramebufferBase > framebuffer) noexcept
 Sets framebuffer for the graphics output.
 
virtual ~FramebufferGraphicsOutput ()=default
 Destructor.
 

Detailed Description

FramebufferGraphicsOutput class.

Mixin interface for graphics outputs that expose a kanzi::Framebuffer. This interface participates in the graphics output capability query. See Application::getGraphicsOutput<>().

Since
Kanzi 4.0.0
Attention
This feature is experimental and is likely to change in future releases.

Constructor & Destructor Documentation

◆ FramebufferGraphicsOutput()

kanzi::FramebufferGraphicsOutput::FramebufferGraphicsOutput ( )
explicitnoexcept

Constructor.

◆ ~FramebufferGraphicsOutput()

virtual kanzi::FramebufferGraphicsOutput::~FramebufferGraphicsOutput ( )
virtualdefault

Destructor.

Member Function Documentation

◆ setFramebuffer()

void kanzi::FramebufferGraphicsOutput::setFramebuffer ( unique_ptr< FramebufferBase > framebuffer)
noexcept

Sets framebuffer for the graphics output.

Parameters
framebufferFramebuffer to set. May not be nullptr.

◆ getFramebuffer() [1/2]

template<typename FramebufferT , typename = enable_if_t<is_base_of_v<FramebufferBase, FramebufferT>>>
KZ_NO_DISCARD FramebufferT * kanzi::FramebufferGraphicsOutput::getFramebuffer ( ) const
noexcept

Returns the framebuffer for the graphics output.

Template Parameters
FramebufferTFramebuffer type to return.
Returns
The framebuffer.
Return values
nullptrThe framebuffer is either not set or is not convertible to FramebufferT.

◆ invalidate()

void kanzi::FramebufferGraphicsOutput::invalidate ( )
noexcept

Invalidates underlying framebuffer.

◆ getTargetTransformation()

virtual KZ_NO_DISCARD Matrix4x4 kanzi::FramebufferGraphicsOutput::getTargetTransformation ( ) const
pure virtualnoexcept

Returns the target transformation.

Use the target transformation to transform content coordinates to target coordinates.

Note
This transformation maps pixels to pixels. It is independent of the target resolution.
Returns
Target transformation matrix.

Implemented in kanzi::emscripten::DefaultEmscriptenGraphicsOutput, kanzi::ios::DefaultIosGraphicsOutput, kanzi::LegacyGraphicsOutput, kanzi::macos::DefaultMacosGraphicsOutput, kanzi::ohos::DefaultOhosEGLGraphicsOutput, kanzi::qnx::DefaultQnxEGLGraphicsOutput, kanzi::wayland::DefaultWaylandEGLGraphicsOutput, kanzi::wayland::WaylandIVIEGLGraphicsOutput, kanzi::win32::DefaultWin32WGLGraphicsOutput, and kanzi::x11::DefaultX11EGLGraphicsOutput.

◆ getNativeFramebufferHandle()

virtual KZ_NO_DISCARD uintptr_t kanzi::FramebufferGraphicsOutput::getNativeFramebufferHandle ( platform::APIBackend backend) const
pure virtualnoexcept

◆ getFramebuffer() [2/2]

FramebufferT * kanzi::FramebufferGraphicsOutput::getFramebuffer ( ) const
noexcept

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