Changed padding to not have const uint8_t.
the build was successful
Details
the build was successful
Details
This commit is contained in:
parent
588ec1b44c
commit
6b1b16304f
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 3.2)
|
cmake_minimum_required (VERSION 3.2)
|
||||||
project(identiconpp
|
project(identiconpp
|
||||||
VERSION 0.5.0
|
VERSION 0.6.0
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ Identiconpp::Identiconpp(const uint8_t columns, const uint8_t rows,
|
||||||
algorithm type,
|
algorithm type,
|
||||||
const string &background,
|
const string &background,
|
||||||
const vector<string> &foreground,
|
const vector<string> &foreground,
|
||||||
const array<const uint8_t, 2> &padding)
|
const array<uint8_t, 2> &padding)
|
||||||
: _rows(rows)
|
: _rows(rows)
|
||||||
, _columns(columns)
|
, _columns(columns)
|
||||||
, _type(type)
|
, _type(type)
|
||||||
|
|
|
@ -73,12 +73,14 @@ public:
|
||||||
* @param background Background color, hexadecimal, rrggbbaa
|
* @param background Background color, hexadecimal, rrggbbaa
|
||||||
* @param foreground vector of foreground colors
|
* @param foreground vector of foreground colors
|
||||||
* @param padding Padding in pixels { left & right, top & down }
|
* @param padding Padding in pixels { left & right, top & down }
|
||||||
|
*
|
||||||
|
* @since before 0.5.0
|
||||||
*/
|
*/
|
||||||
explicit Identiconpp(const uint8_t columns, const uint8_t rows,
|
explicit Identiconpp(const uint8_t columns, const uint8_t rows,
|
||||||
algorithm type = algorithm::ltr_symmetric,
|
algorithm type = algorithm::ltr_symmetric,
|
||||||
const string &background = "ffffffff",
|
const string &background = "ffffffff",
|
||||||
const vector<string> &foreground = { "000000ff" },
|
const vector<string> &foreground = { "000000ff" },
|
||||||
const array<const uint8_t, 2> &padding = { 0, 0 });
|
const array<uint8_t, 2> &padding = { 0, 0 });
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Generates identicon from digest.
|
* @brief Generates identicon from digest.
|
||||||
|
@ -87,6 +89,8 @@ public:
|
||||||
* @param width The width of the image in pixels
|
* @param width The width of the image in pixels
|
||||||
*
|
*
|
||||||
* @return The image as Magick::Image
|
* @return The image as Magick::Image
|
||||||
|
*
|
||||||
|
* @since before 0.5.0
|
||||||
*/
|
*/
|
||||||
Magick::Image generate(const string &digest, const uint16_t width = 100);
|
Magick::Image generate(const string &digest, const uint16_t width = 100);
|
||||||
|
|
||||||
|
@ -98,6 +102,8 @@ public:
|
||||||
* @param width The width of the image in pixels
|
* @param width The width of the image in pixels
|
||||||
*
|
*
|
||||||
* @return The image as base64-string
|
* @return The image as base64-string
|
||||||
|
*
|
||||||
|
* @since 0.5.0
|
||||||
*/
|
*/
|
||||||
const string generate_base64(const string &magick, const string &digest,
|
const string generate_base64(const string &magick, const string &digest,
|
||||||
const uint16_t width = 100);
|
const uint16_t width = 100);
|
||||||
|
@ -108,7 +114,7 @@ private:
|
||||||
const algorithm _type;
|
const algorithm _type;
|
||||||
const string _background;
|
const string _background;
|
||||||
const vector<string> _foreground;
|
const vector<string> _foreground;
|
||||||
const array<const uint8_t, 2> _padding;
|
const array<uint8_t, 2> _padding;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Generate ltr_symmetric identicon.
|
* @brief Generate ltr_symmetric identicon.
|
||||||
|
@ -120,6 +126,8 @@ private:
|
||||||
* @param digest The pre-computed digest
|
* @param digest The pre-computed digest
|
||||||
*
|
*
|
||||||
* @return The image
|
* @return The image
|
||||||
|
*
|
||||||
|
* @since before 0.5.0
|
||||||
*/
|
*/
|
||||||
Magick::Image generate_ltr_symmetric(const string &digest);
|
Magick::Image generate_ltr_symmetric(const string &digest);
|
||||||
|
|
||||||
|
@ -133,6 +141,8 @@ private:
|
||||||
* @param digest The pre-computed digest
|
* @param digest The pre-computed digest
|
||||||
*
|
*
|
||||||
* @return The image
|
* @return The image
|
||||||
|
*
|
||||||
|
* @since before 0.5.0
|
||||||
*/
|
*/
|
||||||
Magick::Image generate_ltr_asymmetric(const string &digest);
|
Magick::Image generate_ltr_asymmetric(const string &digest);
|
||||||
|
|
||||||
|
@ -146,6 +156,8 @@ private:
|
||||||
* @param digest The pre-computed digest
|
* @param digest The pre-computed digest
|
||||||
*
|
*
|
||||||
* @return The image
|
* @return The image
|
||||||
|
*
|
||||||
|
* @since before 0.5.0
|
||||||
*/
|
*/
|
||||||
Magick::Image generate_sigil(const string &digest);
|
Magick::Image generate_sigil(const string &digest);
|
||||||
|
|
||||||
|
@ -156,6 +168,8 @@ private:
|
||||||
*
|
*
|
||||||
* @param digest The pre-computed digest
|
* @param digest The pre-computed digest
|
||||||
* @param type The type of identicon
|
* @param type The type of identicon
|
||||||
|
*
|
||||||
|
* @since before 0.5.0
|
||||||
*/
|
*/
|
||||||
void check_entropy(const string &digest, algorithm type);
|
void check_entropy(const string &digest, algorithm type);
|
||||||
|
|
||||||
|
@ -166,6 +180,8 @@ private:
|
||||||
* @param digest The digest
|
* @param digest The digest
|
||||||
*
|
*
|
||||||
* @return The bit.
|
* @return The bit.
|
||||||
|
*
|
||||||
|
* @since before 0.5.0
|
||||||
*/
|
*/
|
||||||
bool get_bit(const uint16_t bit, const string &digest);
|
bool get_bit(const uint16_t bit, const string &digest);
|
||||||
|
|
||||||
|
@ -178,6 +194,8 @@ private:
|
||||||
* @param digest The digest
|
* @param digest The digest
|
||||||
*
|
*
|
||||||
* @return A foreground color.
|
* @return A foreground color.
|
||||||
|
*
|
||||||
|
* @since before 0.5.0
|
||||||
*/
|
*/
|
||||||
Magick::Color get_color(const uint16_t firstbit, const string &digest);
|
Magick::Color get_color(const uint16_t firstbit, const string &digest);
|
||||||
|
|
||||||
|
@ -187,6 +205,8 @@ private:
|
||||||
* @param c Character to check
|
* @param c Character to check
|
||||||
*
|
*
|
||||||
* @return true if not hex.
|
* @return true if not hex.
|
||||||
|
*
|
||||||
|
* @since before 0.5.0
|
||||||
*/
|
*/
|
||||||
static bool not_hex(const char c);
|
static bool not_hex(const char c);
|
||||||
|
|
||||||
|
@ -194,6 +214,8 @@ private:
|
||||||
* @brief Performs checks on a color definition in a string.
|
* @brief Performs checks on a color definition in a string.
|
||||||
*
|
*
|
||||||
* @param color The color as string
|
* @param color The color as string
|
||||||
|
*
|
||||||
|
* @since before 0.5.0
|
||||||
*/
|
*/
|
||||||
void check_color(const string &color);
|
void check_color(const string &color);
|
||||||
};
|
};
|
||||||
|
|
|
@ -61,6 +61,8 @@ extern "C"
|
||||||
* @param padding Padding in pixels { left & right, top & down }
|
* @param padding Padding in pixels { left & right, top & down }
|
||||||
*
|
*
|
||||||
* @return false on error, true otherwise.
|
* @return false on error, true otherwise.
|
||||||
|
*
|
||||||
|
* @since before 0.5.0
|
||||||
*/
|
*/
|
||||||
bool identiconpp_setup(const uint8_t columns, const uint8_t rows,
|
bool identiconpp_setup(const uint8_t columns, const uint8_t rows,
|
||||||
identiconpp_algorithm type,
|
identiconpp_algorithm type,
|
||||||
|
@ -77,6 +79,8 @@ extern "C"
|
||||||
* @param width The width of the identicon
|
* @param width The width of the identicon
|
||||||
*
|
*
|
||||||
* @return Length of the generated base64-string, or 0 on error.
|
* @return Length of the generated base64-string, or 0 on error.
|
||||||
|
*
|
||||||
|
* @since before 0.5.0
|
||||||
*/
|
*/
|
||||||
uint64_t identiconpp_generate(const char magick[],
|
uint64_t identiconpp_generate(const char magick[],
|
||||||
const char digest[], const uint16_t width);
|
const char digest[], const uint16_t width);
|
||||||
|
@ -84,6 +88,8 @@ extern "C"
|
||||||
/*!
|
/*!
|
||||||
* @brief Return base64-encoded string of the image generated with
|
* @brief Return base64-encoded string of the image generated with
|
||||||
* identiconpp_generate().
|
* identiconpp_generate().
|
||||||
|
*
|
||||||
|
* @since before 0.5.0
|
||||||
*/
|
*/
|
||||||
const char *identiconpp_base64();
|
const char *identiconpp_base64();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue