Monopoly — Portage moderne 0.1.0
Portage moderne C/C++23 du Monopoly de 1999
Loading...
Searching...
No Matches
monopoly::data::RuntimeBitmapStore Class Referencefinal

#include <RuntimeBitmapSurface.hpp>

Public Member Functions

std::expected< DataId, std::string > create (std::uint32_t width, std::uint32_t height, bool transparent, std::uint8_t globalAlpha=255)
 
std::expected< void, std::string > update (DataId id, LegacyBitmapRGBA8 image, std::optional< std::array< float, 4 > > presentationRect={}, bool preferLinearFiltering=false)
 
std::expected< void, std::string > fill (DataId id, std::int32_t x, std::int32_t y, std::int32_t width, std::int32_t height, std::uint32_t colorRef)
 
std::expected< void, std::string > blit (DataId id, const LegacyBitmapRGBA8 &source, std::int32_t x, std::int32_t y, BitmapBlitMode mode=BitmapBlitMode::SourceOver)
 
std::expected< void, std::string > setGlobalAlpha (DataId id, std::uint8_t alpha)
 
std::optional< RuntimeBitmapExtent > extent (DataId id) const noexcept
 
std::optional< std::uint8_t > globalAlpha (DataId id) const noexcept
 
std::shared_ptr< const BitmapRuntimeAsset > asset (DataId id) const noexcept
 
bool contains (DataId id) const noexcept
 
bool remove (DataId id) noexcept
 
void clear () noexcept
 
std::size_t size () const noexcept
 

Detailed Description

Definition at line 38 of file RuntimeBitmapSurface.hpp.

Member Function Documentation

◆ asset()

std::shared_ptr< const BitmapRuntimeAsset > monopoly::data::RuntimeBitmapStore::asset ( DataId  id) const
noexcept

Definition at line 285 of file RuntimeBitmapSurface.cpp.

◆ blit()

std::expected< void, std::string > monopoly::data::RuntimeBitmapStore::blit ( DataId  id,
const LegacyBitmapRGBA8 &  source,
std::int32_t  x,
std::int32_t  y,
BitmapBlitMode  mode = BitmapBlitMode::SourceOver 
)

Definition at line 237 of file RuntimeBitmapSurface.cpp.

◆ clear()

void monopoly::data::RuntimeBitmapStore::clear ( )
noexcept

Definition at line 297 of file RuntimeBitmapSurface.cpp.

◆ contains()

bool monopoly::data::RuntimeBitmapStore::contains ( DataId  id) const
inlinenoexcept

Definition at line 64 of file RuntimeBitmapSurface.hpp.

◆ create()

std::expected< DataId, std::string > monopoly::data::RuntimeBitmapStore::create ( std::uint32_t  width,
std::uint32_t  height,
bool  transparent,
std::uint8_t  globalAlpha = 255 
)

Definition at line 127 of file RuntimeBitmapSurface.cpp.

◆ extent()

std::optional< RuntimeBitmapExtent > monopoly::data::RuntimeBitmapStore::extent ( DataId  id) const
noexcept

Definition at line 267 of file RuntimeBitmapSurface.cpp.

◆ fill()

std::expected< void, std::string > monopoly::data::RuntimeBitmapStore::fill ( DataId  id,
std::int32_t  x,
std::int32_t  y,
std::int32_t  width,
std::int32_t  height,
std::uint32_t  colorRef 
)

Definition at line 190 of file RuntimeBitmapSurface.cpp.

◆ globalAlpha()

std::optional< std::uint8_t > monopoly::data::RuntimeBitmapStore::globalAlpha ( DataId  id) const
noexcept

Definition at line 276 of file RuntimeBitmapSurface.cpp.

◆ remove()

bool monopoly::data::RuntimeBitmapStore::remove ( DataId  id)
noexcept

Definition at line 292 of file RuntimeBitmapSurface.cpp.

◆ setGlobalAlpha()

std::expected< void, std::string > monopoly::data::RuntimeBitmapStore::setGlobalAlpha ( DataId  id,
std::uint8_t  alpha 
)

Definition at line 255 of file RuntimeBitmapSurface.cpp.

◆ size()

std::size_t monopoly::data::RuntimeBitmapStore::size ( ) const
inlinenoexcept

Definition at line 68 of file RuntimeBitmapSurface.hpp.

◆ update()

std::expected< void, std::string > monopoly::data::RuntimeBitmapStore::update ( DataId  id,
LegacyBitmapRGBA8  image,
std::optional< std::array< float, 4 > >  presentationRect = {},
bool  preferLinearFiltering = false 
)

Definition at line 157 of file RuntimeBitmapSurface.cpp.


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