diff --git a/external/lunasvg/3rdparty/plutovg/plutovg-rle.c b/external/lunasvg/3rdparty/plutovg/plutovg-rle.c index 783ee8354..857628ad0 100644 --- a/external/lunasvg/3rdparty/plutovg/plutovg-rle.c +++ b/external/lunasvg/3rdparty/plutovg/plutovg-rle.c @@ -6,12 +6,13 @@ #include #include +#define ALIGN_SIZE(size) (((size) + 7ul) & ~7ul) static void ft_outline_init(PVG_FT_Outline* outline, plutovg_t* pluto, int points, int contours) { - size_t size_a = (points + contours) * sizeof(PVG_FT_Vector); - size_t size_b = (points + contours) * sizeof(char); - size_t size_c = contours * sizeof(int); - size_t size_d = contours * sizeof(char); + size_t size_a = ALIGN_SIZE((points + contours) * sizeof(PVG_FT_Vector)); + size_t size_b = ALIGN_SIZE((points + contours) * sizeof(char)); + size_t size_c = ALIGN_SIZE(contours * sizeof(int)); + size_t size_d = ALIGN_SIZE(contours * sizeof(char)); size_t size_n = size_a + size_b + size_c + size_d; if(size_n > pluto->outline_size) { pluto->outline_data = realloc(pluto->outline_data, size_n); diff --git a/external/lunasvg/3rdparty/plutovg/plutovg.c b/external/lunasvg/3rdparty/plutovg/plutovg.c index a5ee85c73..3b357bcbf 100644 --- a/external/lunasvg/3rdparty/plutovg/plutovg.c +++ b/external/lunasvg/3rdparty/plutovg/plutovg.c @@ -223,7 +223,7 @@ plutovg_texture_t* plutovg_set_texture(plutovg_t* pluto, plutovg_surface_t* surf { plutovg_paint_t* paint = &pluto->state->paint; paint->type = plutovg_paint_type_texture; - plutovg_texture_init(&paint->texture, surface, plutovg_texture_type_plain); + plutovg_texture_init(&paint->texture, surface, type); return &paint->texture; } diff --git a/external/lunasvg/source/markerelement.cpp b/external/lunasvg/source/markerelement.cpp index 5a61aff69..1de0aba90 100644 --- a/external/lunasvg/source/markerelement.cpp +++ b/external/lunasvg/source/markerelement.cpp @@ -24,13 +24,13 @@ Length MarkerElement::refY() const Length MarkerElement::markerWidth() const { auto& value = get(PropertyID::MarkerWidth); - return Parser::parseLength(value, ForbidNegativeLengths, Length::ThreePercent); + return Parser::parseLength(value, ForbidNegativeLengths, Length::Three); } Length MarkerElement::markerHeight() const { auto& value = get(PropertyID::MarkerHeight); - return Parser::parseLength(value, ForbidNegativeLengths, Length::ThreePercent); + return Parser::parseLength(value, ForbidNegativeLengths, Length::Three); } Angle MarkerElement::orient() const diff --git a/external/lunasvg/source/property.cpp b/external/lunasvg/source/property.cpp index 44b1414df..6dd4e2c32 100644 --- a/external/lunasvg/source/property.cpp +++ b/external/lunasvg/source/property.cpp @@ -1,5 +1,5 @@ #include "property.h" -#include "styledelement.h" +#include "element.h" #include "lunasvg.h" #include @@ -547,7 +547,7 @@ void PathIterator::next() const Length Length::Unknown{0, LengthUnits::Unknown}; const Length Length::Zero{0, LengthUnits::Number}; const Length Length::One{1, LengthUnits::Number}; -const Length Length::ThreePercent{3, LengthUnits::Percent}; +const Length Length::Three{3, LengthUnits::Number}; const Length Length::HundredPercent{100, LengthUnits::Percent}; const Length Length::FiftyPercent{50, LengthUnits::Percent}; const Length Length::OneTwentyPercent{120, LengthUnits::Percent}; diff --git a/external/lunasvg/source/property.h b/external/lunasvg/source/property.h index 619581046..cdbff73e6 100644 --- a/external/lunasvg/source/property.h +++ b/external/lunasvg/source/property.h @@ -285,7 +285,7 @@ public: static const Length Unknown; static const Length Zero; static const Length One; - static const Length ThreePercent; + static const Length Three; static const Length HundredPercent; static const Length FiftyPercent; static const Length OneTwentyPercent;