Moved image_null into a header
This commit is contained in:
parent
2e10b2ca1a
commit
5a49842952
5 changed files with 10 additions and 17 deletions
|
@ -24,6 +24,7 @@
|
|||
#define MAPNIK_IMAGE_ANY_HPP
|
||||
|
||||
#include <mapnik/image.hpp>
|
||||
#include <mapnik/image_null.hpp>
|
||||
#include <mapnik/util/variant.hpp>
|
||||
|
||||
namespace mapnik {
|
||||
|
|
|
@ -312,19 +312,6 @@ inline image_dtype image<T>::get_dtype() const
|
|||
return dtype;
|
||||
}
|
||||
|
||||
/*
|
||||
using image_rgba8 = image<rgba8_t>;
|
||||
using image_gray8 = image<gray8_t>;
|
||||
using image_gray8s = image<gray8s_t>;
|
||||
using image_gray16 = image<gray16_t>;
|
||||
using image_gray16s = image<gray16s_t>;
|
||||
using image_gray32 = image<gray32_t>;
|
||||
using image_gray32s = image<gray32s_t>;
|
||||
using image_gray32f = image<gray32f_t>;
|
||||
using image_gray64 = image<gray64_t>;
|
||||
using image_gray64s = image<gray64s_t>;
|
||||
using image_gray64f = image<gray64f_t>;
|
||||
*/
|
||||
} // end ns
|
||||
|
||||
#endif // MAPNIK_IMAGE_IMPL_HPP
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
/*****************************************************************************
|
||||
*
|
||||
* This file is part of Mapnik (c++ mapping toolkit)
|
||||
|
@ -21,9 +20,12 @@
|
|||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef MAPNIK_IMAGE_NULL_HPP
|
||||
#define MAPNIK_IMAGE_NULL_HPP
|
||||
|
||||
// mapnik
|
||||
#include <mapnik/config.hpp>
|
||||
#include <mapnik/image.hpp>
|
||||
//#include <mapnik/image.hpp>
|
||||
#include <mapnik/pixel_types.hpp>
|
||||
|
||||
//stl
|
||||
|
@ -49,12 +51,13 @@ public:
|
|||
image(image<null_t> const& rhs) {}
|
||||
image(image<null_t> && rhs) noexcept {}
|
||||
|
||||
void swap(image<null_t> & rhs) {}
|
||||
std::size_t width() const { return 0; }
|
||||
std::size_t height() const { return 0; }
|
||||
unsigned getSize() const { return 0; }
|
||||
unsigned getRowSize() const { return 0; }
|
||||
void set(pixel_type const& t) { throw std::runtime_error("Can not set values for null image"); }
|
||||
pixel_type& operator() (std::size_t i, std::size_t j) { throw std::runtime_error("Can not get or set values for null image"); }
|
||||
const pixel_type& operator() (std::size_t i, std::size_t j) const { throw std::runtime_error("Can not get or set values for null image"); }
|
||||
const unsigned char* getBytes() const { return nullptr; }
|
||||
unsigned char* getBytes() {return nullptr; }
|
||||
double get_offset() const { return 0.0; }
|
||||
|
@ -69,3 +72,5 @@ public:
|
|||
};
|
||||
|
||||
} // end ns mapnik
|
||||
|
||||
#endif // MAPNIK_IMAGE_NULL_HPP
|
|
@ -178,7 +178,6 @@ source = Split(
|
|||
image_view.cpp
|
||||
image_view_any.cpp
|
||||
image_any.cpp
|
||||
image_null.cpp
|
||||
image_util.cpp
|
||||
image_util_jpeg.cpp
|
||||
image_util_png.cpp
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
// mapnik
|
||||
#include <mapnik/config.hpp>
|
||||
#include <mapnik/image.hpp>
|
||||
#include <mapnik/image_null.hpp>
|
||||
#include <mapnik/image_impl.hpp>
|
||||
#include <mapnik/pixel_types.hpp>
|
||||
|
||||
|
|
Loading…
Reference in a new issue