]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.modeling/scl/Simantics/Scenegraph.scl
SVG conversion SCL API improvements.
[simantics/platform.git] / bundles / org.simantics.modeling / scl / Simantics / Scenegraph.scl
index 3d1170682a606f0db33b8cdbad6cc8575c3fb3f7..401f2d8afaaaec6dc6816c38ec507930a101ca8b 100644 (file)
@@ -5,6 +5,9 @@ import "Simantics/Rename"
 importJava "org.simantics.g2d.canvas.ICanvasContext" where
     data ICanvasContext
     
+    @JavaName dispose
+    disposeCanvasContext :: ICanvasContext -> <Proc> ()
+    
 importJava "org.simantics.g2d.scenegraph.ICanvasSceneGraphProvider" where
     data ICanvasSceneGraphProvider
     
@@ -65,6 +68,26 @@ importJava "org.simantics.modeling.SCLScenegraph" where
     "Render an SVG with known width and height in pixels: `renderScaledSVG context width height`"
     @JavaName renderSVG
     renderScaledSVG :: ICanvasContext -> Double -> Double -> <Proc> String
+    
+    @JavaName renderSVG
+    renderScaledAndAlignedSVG :: ICanvasContext -> Double -> Double -> Integer -> Integer -> <Proc> String
+
+importJava "org.eclipse.swt.SWT" where
+    
+    @JavaName LEFT
+    ALIGN_LEFT :: Integer
+    
+    @JavaName RIGHT
+    ALIGN_RIGHT :: Integer
+    
+    @JavaName CENTER
+    ALIGN_CENTER :: Integer
+    
+    @JavaName TOP
+    ALIGN_TOP :: Integer
+    
+    @JavaName BOTTOM
+    ALIGN_BOTTOM :: Integer
 
 getSceneGraphProvider :: Diagram -> <Proc> ICanvasSceneGraphProvider
 getSceneGraphProvider diagram = do