Skip to content

File include/brisk/graphics/Offscreen.hpp


OffscreenCanvas class

OffscreenCanvas

OffscreenCanvasClass for handling offscreen rendering.

OffscreenCanvas function (OffscreenCanvas::OffscreenCanvas)

OffscreenCanvas(Size size, float pixelRatio = 1.f, const VisualSettings& settings =

Constructs an OffscreenCanvas object with the specified size and pixel ratio.
Param size The dimensions of the rendering target.
Param pixelRatio The ratio of pixels to physical pixels (default is 1.0).

~OffscreenCanvas function (OffscreenCanvas::~OffscreenCanvas)

~OffscreenCanvas()

Destructor for the OffscreenCanvas object.

render function (OffscreenCanvas::render)

Rc<Image> render()

Renders the offscreen image and returns the resulting image.
Returns A reference-counted pointer to the rendered image in RGBA format.

rect function (OffscreenCanvas::rect)

Rectangle rect() const

Gets the rectangle representing the size of the rendering target.
Returns The rectangle of the rendering target.

canvas function (OffscreenCanvas::canvas)

Canvas &canvas()

Provides access to the canvas used for rendering.
Returns A reference to the canvas.

State class (OffscreenCanvas::State)

State

target variable (OffscreenCanvas::State::target)

Rc<ImageRenderTarget> target

The render target for offscreen rendering.

encoder variable (OffscreenCanvas::State::encoder)

Rc<RenderEncoder> encoder

The render encoder used during rendering.

context variable (OffscreenCanvas::State::context)

std::unique_ptr<RenderPipeline> context

The context for the rendering pipeline.

canvas variable (OffscreenCanvas::State::canvas)

std::unique_ptr<Canvas> canvas

The canvas used for drawing.


Auto-generated from sources, Revision , https://github.com/brisklib/brisk/blob//include/brisk/