Просмотр исходного кода

Also scale intrinsic dimensions of the Lottie element by dp-ratio

Michael Ragazzon 1 месяц назад
Родитель
Сommit
174e1fe28a
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      Source/Lottie/ElementLottie.cpp

+ 3 - 0
Source/Lottie/ElementLottie.cpp

@@ -31,6 +31,7 @@
 #include "../../Include/RmlUi/Core/Context.h"
 #include "../../Include/RmlUi/Core/Core.h"
 #include "../../Include/RmlUi/Core/ElementDocument.h"
+#include "../../Include/RmlUi/Core/ElementUtilities.h"
 #include "../../Include/RmlUi/Core/FileInterface.h"
 #include "../../Include/RmlUi/Core/MeshUtilities.h"
 #include "../../Include/RmlUi/Core/PropertyIdSet.h"
@@ -53,6 +54,8 @@ bool ElementLottie::GetIntrinsicDimensions(Vector2f& dimensions, float& ratio)
 	if (dimensions.y > 0)
 		ratio = dimensions.x / dimensions.y;
 
+	dimensions *= ElementUtilities::GetDensityIndependentPixelRatio(this);
+
 	return true;
 }