X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.diagram%2Fscl%2FSimantics%2FDiagram%2FSVGNode.scl;fp=bundles%2Forg.simantics.diagram%2Fscl%2FSimantics%2FDiagram%2FSVGNode.scl;h=9c5d43c4f37028b1cc7e160915eb5a76b3ce4d4b;hb=e1c5d8d7c5589cfa4a254e167f4d9f0e66df6bf7;hp=0000000000000000000000000000000000000000;hpb=1831379a76507e86e0f3c15f6018ca044e62de7d;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.diagram/scl/Simantics/Diagram/SVGNode.scl b/bundles/org.simantics.diagram/scl/Simantics/Diagram/SVGNode.scl new file mode 100644 index 000000000..9c5d43c4f --- /dev/null +++ b/bundles/org.simantics.diagram/scl/Simantics/Diagram/SVGNode.scl @@ -0,0 +1,20 @@ + +type BoundingBox = (Double,Double,Double,Double) + +importJava "org.simantics.diagram.elements.SVGMeasurementContext" where + data SVGMeasurementContext + getBoundingBox :: SVGMeasurementContext -> String -> Maybe BoundingBox + +getBoundingBoxX :: BoundingBox -> Double +getBoundingBoxX (x,_,_,_) = x + +getBoundingBoxY :: BoundingBox -> Double +getBoundingBoxY (_,y,_,_) = y + +getBoundingBoxW :: BoundingBox -> Double +getBoundingBoxW (_,_,w,_) = w + +getBoundingBoxH :: BoundingBox -> Double +getBoundingBoxH (_,_,_,h) = h + +