From a87692ae1f33fe08bffcd1a42d68dc82ff7ca10d Mon Sep 17 00:00:00 2001 From: Alexander Nozik Date: Thu, 15 Jul 2021 19:45:43 +0300 Subject: [PATCH] Fix labels for JavaFX --- .../kotlin/space/kscience/visionforge/solid/demo/FXDemoApp.kt | 1 + .../main/kotlin/space/kscience/visionforge/solid/FX3DPlugin.kt | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/demo/solid-showcase/src/jvmMain/kotlin/space/kscience/visionforge/solid/demo/FXDemoApp.kt b/demo/solid-showcase/src/jvmMain/kotlin/space/kscience/visionforge/solid/demo/FXDemoApp.kt index 1ed557ea..3ce92f0f 100644 --- a/demo/solid-showcase/src/jvmMain/kotlin/space/kscience/visionforge/solid/demo/FXDemoApp.kt +++ b/demo/solid-showcase/src/jvmMain/kotlin/space/kscience/visionforge/solid/demo/FXDemoApp.kt @@ -14,6 +14,7 @@ class FXDemoApp : App(FXDemoGrid::class) { stage.height = 600.0 view.showcase() + view.showcaseCSG() } } diff --git a/visionforge-fx/src/main/kotlin/space/kscience/visionforge/solid/FX3DPlugin.kt b/visionforge-fx/src/main/kotlin/space/kscience/visionforge/solid/FX3DPlugin.kt index aac30150..f843e02c 100644 --- a/visionforge-fx/src/main/kotlin/space/kscience/visionforge/solid/FX3DPlugin.kt +++ b/visionforge-fx/src/main/kotlin/space/kscience/visionforge/solid/FX3DPlugin.kt @@ -65,7 +65,8 @@ class FX3DPlugin : AbstractPlugin() { } is SolidLabel -> Text(obj.text).apply { font = Font.font(obj.fontFamily, obj.fontSize) - + transforms.add(Rotate(180.0, Rotate.Y_AXIS)) + transforms.add(Rotate(180.0, Rotate.Z_AXIS)) x = -layoutBounds.width / 2 y = layoutBounds.height / 2 }