neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neogfx::image Class Reference

#include <image.hpp>

Inheritance diagram for neogfx::image:
neolib::reference_counted< Base, DeallocateOnRelease >

Public Types

enum  image_type_e { UnknownImage , PngImage }
 
typedef neolib::vector< uint8_t > data_type
 
typedef data_type hash_digest_type
 

Public Member Functions

 define_declared_event (Downloaded, downloaded) define_declared_event(FailedToDownload
 
 image (dimension aDpiScaleFactor=1.0, texture_sampling aSampling=texture_sampling::NormalMipmap, neogfx::color_space aColorSpace=neogfx::color_space::sRGB)
 
 image (const neogfx::size &aSize, const color &aColor=color::Black, dimension aDpiScaleFactor=1.0, texture_sampling aSampling=texture_sampling::NormalMipmap, neogfx::color_space aColorSpace=neogfx::color_space::sRGB)
 
 image (std::string const &aUri, dimension aDpiScaleFactor=1.0, texture_sampling aSampling=texture_sampling::NormalMipmap, neogfx::color_space aColorSpace=neogfx::color_space::sRGB)
 
 image (std::string const &aImagePattern, const std::unordered_map< std::string, color > &aColorMap, dimension aDpiScaleFactor=1.0, texture_sampling aSampling=texture_sampling::NormalMipmap, neogfx::color_space aColorSpace=neogfx::color_space::sRGB)
 
 image (std::string const &aUri, std::string const &aImagePattern, const std::unordered_map< std::string, color > &aColorMap, dimension aDpiScaleFactor=1.0, texture_sampling aSampling=texture_sampling::NormalMipmap, neogfx::color_space aColorSpace=neogfx::color_space::sRGB)
 
 image (image const &aOther)
 
 image (image &&aOther)
 
 image (image const &aOther, texture_sampling aSampling)
 
 image (image &&aOther, texture_sampling aSampling)
 
 ~image ()
 
bool available () const override
 
bool downloading () const override
 
double downloading_progress () const override
 
bool error () const override
 
i_string const & error_string () const override
 
i_string const & uri () const override
 
bool is_empty () const override
 
const void * cdata () const override
 
const void * data () const override
 
void * data () override
 
std::size_t size () const override
 
hash_digest_type const & hash () const override
 
dimension dpi_scale_factor () const override
 
neogfx::color_space color_space () const override
 
neogfx::color_format color_format () const override
 
texture_sampling sampling () const override
 
texture_data_format data_format () const override
 
const neogfx::sizeextents () const override
 
void resize (const neogfx::size &aNewSize) override
 
const void * cpixels () const override
 
const void * pixels () const override
 
void * pixels () override
 
color get_pixel (const point &aPoint) const override
 
void set_pixel (const point &aPoint, const color &aColor) override
 
- Public Member Functions inherited from neolib::reference_counted< Base, DeallocateOnRelease >
 reference_counted () noexcept
 
 reference_counted (const reference_counted &aOther) noexcept
 
 ~reference_counted ()
 
reference_countedoperator= (const reference_counted &)
 
void add_ref () const noexcept override
 
void release () const override
 
int32_t use_count () const noexcept override
 
const base_type * release_and_take_ownership () const override
 
base_type * release_and_take_ownership () override
 
void pin () const noexcept override
 
void unpin () const override
 
i_ref_control_blockcontrol_block () override
 

Detailed Description

Definition at line 31 of file image.hpp.

Member Typedef Documentation

◆ data_type

Definition at line 43 of file image.hpp.

◆ hash_digest_type

Definition at line 44 of file image.hpp.

Member Enumeration Documentation

◆ image_type_e

Enumerator
UnknownImage 
PngImage 

Definition at line 37 of file image.hpp.

Constructor & Destructor Documentation

◆ image() [1/9]

neogfx::image::image ( dimension  aDpiScaleFactor = 1.0,
texture_sampling  aSampling = texture_sampling::NormalMipmap,
neogfx::color_space  aColorSpace = neogfx::color_space::sRGB 
)

◆ image() [2/9]

neogfx::image::image ( const neogfx::size aSize,
const color aColor = color::Black,
dimension  aDpiScaleFactor = 1.0,
texture_sampling  aSampling = texture_sampling::NormalMipmap,
neogfx::color_space  aColorSpace = neogfx::color_space::sRGB 
)

◆ image() [3/9]

neogfx::image::image ( std::string const &  aUri,
dimension  aDpiScaleFactor = 1.0,
texture_sampling  aSampling = texture_sampling::NormalMipmap,
neogfx::color_space  aColorSpace = neogfx::color_space::sRGB 
)

◆ image() [4/9]

neogfx::image::image ( std::string const &  aImagePattern,
const std::unordered_map< std::string, color > &  aColorMap,
dimension  aDpiScaleFactor = 1.0,
texture_sampling  aSampling = texture_sampling::NormalMipmap,
neogfx::color_space  aColorSpace = neogfx::color_space::sRGB 
)

◆ image() [5/9]

neogfx::image::image ( std::string const &  aUri,
std::string const &  aImagePattern,
const std::unordered_map< std::string, color > &  aColorMap,
dimension  aDpiScaleFactor = 1.0,
texture_sampling  aSampling = texture_sampling::NormalMipmap,
neogfx::color_space  aColorSpace = neogfx::color_space::sRGB 
)

◆ image() [6/9]

neogfx::image::image ( image const &  aOther)

◆ image() [7/9]

neogfx::image::image ( image &&  aOther)

◆ image() [8/9]

neogfx::image::image ( image const &  aOther,
texture_sampling  aSampling 
)

◆ image() [9/9]

neogfx::image::image ( image &&  aOther,
texture_sampling  aSampling 
)

◆ ~image()

neogfx::image::~image ( )

Member Function Documentation

◆ available()

bool neogfx::image::available ( ) const
override

◆ cdata()

const void * neogfx::image::cdata ( ) const
override

◆ color_format()

neogfx::color_format neogfx::image::color_format ( ) const
override

◆ color_space()

neogfx::color_space neogfx::image::color_space ( ) const
override

◆ cpixels()

const void * neogfx::image::cpixels ( ) const
override

◆ data() [1/2]

const void * neogfx::image::data ( ) const
override

◆ data() [2/2]

void * neogfx::image::data ( )
override

◆ data_format()

texture_data_format neogfx::image::data_format ( ) const
override

◆ define_declared_event()

neogfx::image::define_declared_event ( Downloaded  ,
downloaded   
)

◆ downloading()

bool neogfx::image::downloading ( ) const
override

◆ downloading_progress()

double neogfx::image::downloading_progress ( ) const
override

◆ dpi_scale_factor()

dimension neogfx::image::dpi_scale_factor ( ) const
override

◆ error()

bool neogfx::image::error ( ) const
override

◆ error_string()

i_string const & neogfx::image::error_string ( ) const
override

◆ extents()

const neogfx::size & neogfx::image::extents ( ) const
override

◆ get_pixel()

color neogfx::image::get_pixel ( const point aPoint) const
override

◆ hash()

hash_digest_type const & neogfx::image::hash ( ) const
override

◆ is_empty()

bool neogfx::image::is_empty ( ) const
override

◆ pixels() [1/2]

const void * neogfx::image::pixels ( ) const
override

◆ pixels() [2/2]

void * neogfx::image::pixels ( )
override

◆ resize()

void neogfx::image::resize ( const neogfx::size aNewSize)
override

◆ sampling()

texture_sampling neogfx::image::sampling ( ) const
override

◆ set_pixel()

void neogfx::image::set_pixel ( const point aPoint,
const color aColor 
)
override

◆ size()

std::size_t neogfx::image::size ( ) const
override

◆ uri()

i_string const & neogfx::image::uri ( ) const
override

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