Commit b7221aa0 authored by Mart Lubbers's avatar Mart Lubbers

Remove scalableexts

parent 849c6927
Pipeline #17989 failed with stage
in 1 minute and 1 second
......@@ -5,7 +5,7 @@ from StdFunc import id, const
import Data.GenEq
import iTasks.UI.JS.Encoding
import iTasks.WF.Tasks.Interaction
import ScalableExts.Scalable
import Graphics.Scalable.Extensions
import iTasks.Extensions.SVG.SVGEditor
import Ligretto.UoD
......
......@@ -5,7 +5,7 @@ import iTasks.WF.Tasks.Interaction
import iTasks.WF.Combinators.Common
import iTasks.SDS.Sources.Store
import iTasks.UI.Prompt
import ScalableExts.Scalable
import Graphics.Scalable.Extensions
import iTasks.Extensions.SVG.SVGEditor
import StdArray, StdEnum, StdList
from StdFunc import id, const, o
......
definition module ScalableExts.Scalable
/** This module extends Graphics.Scalable.Image
*/
import Graphics.Scalable.Image
/** circular r a imgs = image:
displays @imgs along an arc of radius @r, starting at angle @a.
*/
circular :: !Span !Real ![Image m] -> Image m
implementation module ScalableExts.Scalable
import Graphics.Scalable.Image
import StdEnum, StdList
/** circular r a imgs = image:
displays @imgs along an arc of radius @r, starting at angle @a.
*/
circular :: !Span !Real ![Image m] -> Image m
circular r a imgs
#! n = length imgs
#! sign_a = toReal (sign a)
#! a` = normalize (rad a)
#! alpha = (toRad a`) / (toReal n)
= overlay (repeat (AtMiddleX,AtMiddleY))
[(~r *. cos angle,~r *. sin angle) \\ i <- [0.0, sign_a ..], angle <- [i*alpha - 0.5*pi]]
[rotate (rad (i*alpha)) img \\ i <- [0.0, sign_a ..] & img <- imgs]
(Host (empty (r *. 2) (r *. 2))) // BUG: using NoHost creates incorrect image (offset to left)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment