MapLibre Native Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mbgl::style::Image Class Reference

#include <image.hpp>

Public Member Functions

 Image (std::string id, PremultipliedImage &&, float pixelRatio, bool sdf, ImageStretches stretchX={}, ImageStretches stretchY={}, const std::optional< ImageContent > &content=std::nullopt)
 
 Image (std::string id, PremultipliedImage &&image, float pixelRatio, ImageStretches stretchX={}, ImageStretches stretchY={}, const std::optional< ImageContent > &content=std::nullopt)
 
 Image (const Image &)
 
std::string getID () const
 
const PremultipliedImagegetImage () const
 
float getPixelRatio () const
 Pixel ratio of the sprite image. More...
 
bool isSdf () const
 Whether this image should be interpreted as a signed distance field icon. More...
 
const ImageStretchesgetStretchX () const
 Stretch area of this image. More...
 
const ImageStretchesgetStretchY () const
 Stretch area of this image. More...
 
const std::optional< ImageContent > & getContent () const
 The space where text can be fit into this image. More...
 
 Image (Immutable< Impl > baseImpl_)
 

Public Attributes

Immutable< Impl > baseImpl
 

Detailed Description

Definition at line 29 of file image.hpp.

Constructor & Destructor Documentation

◆ Image() [1/4]

mbgl::style::Image::Image ( std::string  id,
PremultipliedImage &&  ,
float  pixelRatio,
bool  sdf,
ImageStretches  stretchX = {},
ImageStretches  stretchY = {},
const std::optional< ImageContent > &  content = std::nullopt 
)

◆ Image() [2/4]

mbgl::style::Image::Image ( std::string  id,
PremultipliedImage &&  image,
float  pixelRatio,
ImageStretches  stretchX = {},
ImageStretches  stretchY = {},
const std::optional< ImageContent > &  content = std::nullopt 
)
inline

Definition at line 38 of file image.hpp.

◆ Image() [3/4]

mbgl::style::Image::Image ( const Image )

◆ Image() [4/4]

mbgl::style::Image::Image ( Immutable< Impl >  baseImpl_)
inlineexplicit

Definition at line 68 of file image.hpp.

Member Function Documentation

◆ getContent()

const std::optional<ImageContent>& mbgl::style::Image::getContent ( ) const

The space where text can be fit into this image.

◆ getID()

std::string mbgl::style::Image::getID ( ) const

◆ getImage()

const PremultipliedImage& mbgl::style::Image::getImage ( ) const

◆ getPixelRatio()

float mbgl::style::Image::getPixelRatio ( ) const

Pixel ratio of the sprite image.

◆ getStretchX()

const ImageStretches& mbgl::style::Image::getStretchX ( ) const

Stretch area of this image.

◆ getStretchY()

const ImageStretches& mbgl::style::Image::getStretchY ( ) const

Stretch area of this image.

◆ isSdf()

bool mbgl::style::Image::isSdf ( ) const

Whether this image should be interpreted as a signed distance field icon.

Member Data Documentation

◆ baseImpl

Immutable<Impl> mbgl::style::Image::baseImpl

Definition at line 67 of file image.hpp.


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