use pixels in setBackgroundImagePosition and add argument for clamp

This commit is contained in:
Nick Fisher
2022-09-07 17:40:18 +10:00
parent 9e20c2e0b2
commit f956d46dfc
6 changed files with 68 additions and 47 deletions

View File

@@ -19,7 +19,7 @@ abstract class FilamentController {
Future resize(int width, int height, { double devicePixelRatio = 1, double contentScaleFactor=1});
Future setBackgroundImage(String path);
Future setBackgroundImagePosition(double x, double y);
Future setBackgroundImagePosition(double x, double y, {bool clamp=false});
Future loadSkybox(String skyboxPath);
Future removeSkybox();
Future loadIbl(String path);
@@ -137,8 +137,8 @@ class PolyvoxFilamentController extends FilamentController {
}
@override
Future setBackgroundImagePosition(double x, double y) async {
await _channel.invokeMethod("setBackgroundImagePosition", [x,y]);
Future setBackgroundImagePosition(double x, double y, { bool clamp = false}) async {
await _channel.invokeMethod("setBackgroundImagePosition", [x,y, clamp]);
}
@override