Skip to content

Commit

Permalink
Update android bins
Browse files Browse the repository at this point in the history
  • Loading branch information
ANSH3LL committed Mar 16, 2024
1 parent 0f94dba commit 65d771c
Show file tree
Hide file tree
Showing 11 changed files with 7 additions and 40 deletions.
2 changes: 1 addition & 1 deletion android/build.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@echo off
set PATH=%PATH%;"%LOCALAPPDATA%\Android\Sdk\ndk-bundle"
set PATH=%PATH%;"%LOCALAPPDATA%\Android\Sdk\ndk\26.2.11394342"

ndk-build APP_OPTIM="release"
Binary file modified android/jni/arm64-v8a/libresvg.a
Binary file not shown.
Binary file modified android/jni/armeabi-v7a/libresvg.a
Binary file not shown.
Binary file modified android/jni/x86/libresvg.a
Binary file not shown.
Binary file modified android/jni/x86_64/libresvg.a
Binary file not shown.
Binary file modified android/jniLibs/arm64-v8a/libplugin.gfxe.so
Binary file not shown.
Binary file modified android/jniLibs/armeabi-v7a/libplugin.gfxe.so
Binary file not shown.
Binary file modified android/jniLibs/x86/libplugin.gfxe.so
Binary file not shown.
Binary file modified android/jniLibs/x86_64/libplugin.gfxe.so
Binary file not shown.
Binary file modified dependencies/resvg-0.40.0.zip
Binary file not shown.
45 changes: 6 additions & 39 deletions shared/PluginGfxe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -571,47 +571,10 @@ bool setupSVG(resvg_options* opts, resvg_transform* transform, int* width, int*
}

// Sizing
// Only the crop sizing key works as a result of "fit_to" being unavailable in resvg 0.33.0 and later
// Use transform scale to replicate fit_to behaviour
if(s.size() > 0) {
should_crop = (bool)s[4];

// fit_to was removed in resvg 0.33.0
// TODO: Replicate fit_to behaviour using transforms instead. As it currently is, transform does not work with
// crop to bbox. This also needs fixing.
/*
switch((resvg_fit_to_type)s[2]) {
case RESVG_FIT_TO_TYPE_WIDTH:
if(s[0] >= 1) {
fit_to->type = RESVG_FIT_TO_TYPE_WIDTH;
fit_to->value = s[0];
(*width) = (int)s[0];
(*height) = (int)s[1];
}
break;
case RESVG_FIT_TO_TYPE_HEIGHT:
if(s[1] >= 1) {
fit_to->type = RESVG_FIT_TO_TYPE_HEIGHT;
fit_to->value = s[1];
(*width) = (int)s[0];
(*height) = (int)s[1];
}
break;
case RESVG_FIT_TO_TYPE_ZOOM:
if(s[3] > 0) {
fit_to->type = RESVG_FIT_TO_TYPE_ZOOM;
fit_to->value = s[3];
(*multiplier) = s[3];
}
break;
default:
fit_to->type = RESVG_FIT_TO_TYPE_ORIGINAL;
fit_to->value = 1;
break;
}
*/

}

// Transform
Expand All @@ -624,6 +587,10 @@ bool setupSVG(resvg_options* opts, resvg_transform* transform, int* width, int*

transform->e = t[4];
transform->f = t[5];

if(t[0] > 1 || t[3] > 1) {
(*multiplier) = t[0] > t[3] ? t[0] : t[3];
}
}

return should_crop;
Expand Down

0 comments on commit 65d771c

Please sign in to comment.