]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.diagram/scl/Simantics/Diagram/SVGNode.scl
Supply SVG text editor with element measurement context
[simantics/platform.git] / bundles / org.simantics.diagram / scl / Simantics / Diagram / SVGNode.scl
1
2 type BoundingBox = (Double,Double,Double,Double)
3
4 importJava "org.simantics.diagram.elements.SVGMeasurementContext" where
5   data SVGMeasurementContext
6   getBoundingBox :: SVGMeasurementContext -> String -> <Proc> Maybe BoundingBox
7
8 getBoundingBoxX :: BoundingBox -> Double
9 getBoundingBoxX (x,_,_,_) = x
10
11 getBoundingBoxY :: BoundingBox -> Double
12 getBoundingBoxY (_,y,_,_) = y
13
14 getBoundingBoxW :: BoundingBox -> Double
15 getBoundingBoxW (_,_,w,_) = w
16
17 getBoundingBoxH :: BoundingBox -> Double
18 getBoundingBoxH (_,_,_,h) = h
19
20