Skip to content

Commit

Permalink
now it works
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Mar 23, 2023
1 parent 3365e5c commit 82a59d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/lang/miniSVG/Semantiek.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import lang::miniSVG::Syntax;
// Dit vertaalt een-op-een een lijst van miniSVG teken-instructies naar de textuele XML vorm die "SVG" heet.
// Én het regelt de assen (van waar tot waar (-1000 tot 1000), en de richting (y-as omhoog en x-as naar rechts))
str toSVG(miniSVG(list[Element] elements))
= "\<svg id=\"yop\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 1000 1000\" preserveAspectRatio=\"xMidYMid slice\" height=\"100%\" \>
'\<g id=\"assenstelsel\" style=\"fill: lightyellow\" transform=\"matrix(1 0 0 -1 500 500)\" \>
= "\<svg id=\"yop\" style=\"background-color: lightyellow\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" viewBox=\"0 0 1000 1000\" preserveAspectRatio=\"xMidYMid slice\" height=\"100%\" \>
'\<g id=\"assenstelsel\" transform=\"matrix(1 0 0 -1 500 500)\" \>
' <for (e <- elements) {>
' <toSVG(e)><}>
' \<line x1=\"0\" y1=\"-500\" x2=\"0\" y2=\"500\" stroke-dasharray=\"2\" stroke=\"orange\" stroke-opacity=\".5\" /\>
Expand Down
1 change: 0 additions & 1 deletion voorbeelden/zeester.yop
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@ herhaal 3600 {
rechts i + (1 / 10)
i = i + 1
}

0 comments on commit 82a59d6

Please sign in to comment.