Commit graph

887 commits

Author SHA1 Message Date
Mike Pilgrem
2d2a37b6ac
Merge pull request #239 from mpilgrem/bbRect
`svgBoundingPoints` for `RectangleTree` and `ImageTree`
2021-11-07 23:29:24 +00:00
Mike Pilgrem
f73c725db4 svgBoundingPoints for RectangleTree and ImageTree
Currently, the bounding points for a rectangle or an image are only the upper left corner and the bottom right corner (if the width and height are specified).

This pull request suggests that the other two corners of the rectangle need to be specified as bounding points (in case the rectangle is rotated by other than an integral multiple of 90 degrees).

It also adds helper functions `rectPoints` and `rectPoints'` to reduce code duplication.
2021-11-07 22:50:29 +00:00
Mike Pilgrem
10862baa8a
Merge pull request #237 from mpilgrem/bump-ci
Bump Azure Windows CI to `stack.yaml` (lts-18.16)
2021-11-07 18:39:47 +00:00
Mike Pilgrem
bdeabc6520 Bump Azure Windows CI to stack.yaml (lts-18.16) 2021-11-07 17:35:20 +00:00
Mike Pilgrem
9e7472bcae
Merge pull request #236 from mpilgrem/bump
Bump stack.yaml resolver to lts-18.15
2021-11-07 17:25:45 +00:00
Mike Pilgrem
744178deb0 Bump stack.yaml to LTS 18.15
Also adds explicit imports to module `Reanimate.Math.Triangulate`, to avoid name shadowing errors.
2021-11-07 16:51:53 +00:00
Mike Pilgrem
5f02799402 Add bounding boxes for svg nodes
`Reanimate.Svg.BoundingBox.boundingBox` computes bounding boxes on a best-effort basis but currently makes no effort for `svg` nodes. This pull request proposes that the bounding box for svg nodes should be at least estimated based on the document's width and height.

In addition, the addition of helper functions `ellipsePoints` and `toUserUnit'` reduce code duplication in function `svgBoundingPoints`.
2021-11-06 11:44:17 +08:00
Mike Pilgrem
13d3e81c05 Fix #196: Improve Haddock documentation of withFillColor 2021-11-02 06:28:02 +08:00
Mike Pilgrem
584ef607a5 Fix #233 Enforce positive Animation durations
This pull request:

* causes `mkAnimation` to check (at run time) that the duration is positive, and exports new `unsafeMkAnimation` which still does not check;
* uses the 'smart' constructor, and its check, in `staticFrame`, `pause`, `pauseAtBeginning`, `adjustDuration`, `repeatA`, `takeA` and `dropA`. Consequently, `takeA` and `dropA` do not need to clamp;
* allows `pauseAtBeginning` and `pauseAtEnd` to have a zero duration (and, consequently, `pauseAround`);
* allows `dropA` to drop 'nothing'; and
* expands Haddock documentation of functions introducing duration, to explain valid values of duration.

It also reformats some other Haddock comments with very long lines, so that code lines are no longer than 80 characters.
2021-11-02 06:27:38 +08:00
Mike Pilgrem
1f6e35235a Suppress false broken link reports
The link checker is reporting that the links in documentation to inkscape.org and wiki.gnome.org/Projects/LibRsvg are broken (with code 403 - Forbidden) when they are good links.
2021-10-20 18:53:09 +08:00
Mike Pilgrem
cb733df81d Correct and extend `Reanimate.Povray' Haddock documentation
This pull request corrects the Haddock documentation for `Reanimate.Povray' (incorrect narrative for some functions yielding `Tree' and inconsistent width x height dimensions).

It also extends the introductory Haddock documenation to describe the structure of the functions exported and the use of their arguments, common to all the functions.
2021-10-17 10:15:16 +08:00
Mike Pilgrem
a9b9728f0f Update POV-Ray examples to avoid POV-Ray warnings
This pull request updates the POV scripts in the two POV-Ray examples to avoid the warning messages in POV-Ray 3.7 (released November 2013).

POV-Ray 3.7 requires the `version` directive.

POV-Ray 3.7 considers the `assumed_gamma` keyword to be mandatory.

POV-Ray warns when a `polygon` is not closed.

POV-Ray warns when a scaling component is omitted.
2021-10-17 10:14:51 +08:00
Mike Pilgrem
f53332f93b Add documentation on obtaining dependencies on Windows
This pull request proposes an additional subsection in the documentation explaining to Windows users how they can obtain the FFmpeg, dvisvgm, POV-Ray, Blender, rsvg-convert, Inkscape, ImageMagick and LaTeX/XeLaTex dependencies.
2021-10-17 10:13:42 +08:00
Mike Pilgrem
d1096abb63 Refactor Reanimate.Povray and OS-specifc POVRay
Further to pull request #225, I realised subsequently that the common code in the two `POVRay.mkPovrayImage'` functions could be returned to module `Reanimate.Povray`, and all that needed to be Windows- or Unix-like-specific was a `runPOVRay` function.

This pull request does that refactoring.
2021-10-17 10:12:28 +08:00
Mike Pilgrem
ceb727e8da
Enable use of POV-Ray for Windows (#225)
This pull request reflects code changes made to be able to use POV-Ray for Windows, Version 3.7.0.msvc10.win64.

The changes have been tested on Windows 10 but not on unix-like operating systems. However, I don't think the code for unix-like operating systems has been affected.

The reason for the changes is explained below.

1. The POV-Ray for Windows executable is named `pvengine64.exe` on 64-bit Windows, not `povray

I've created two modules `POVRay`, specified separately for `windows` and `unix`, that export `povrayApp :: String`, yielding the correct name of the executable. The function is used in place of `"povray"` (eg in `Reanimate.Driver.Check.hasPovray`).

2. Generated file names containing `$` cause problems under PowerShell, due to automatic variables, and file names on Windows are not case sensitive

I've changed the 64-character `alphabet` in `Reanimate.Cache.encodeInt` for a 32-character one which includes only capital letters and digits. This affects both Windows and unix-like operating systems. (An alternative would be versions of `encodeInt` specified differently for `windows` and `unix`.)

3. POV-Ray for Windows requires the special command line option `/EXIT` to return

I've moved `Reanimate.Povray.mkPovrayImage'` to the two modules `POVRay`. In the `windows` version, `/EXIT` is now added to the list of switches passed to the POV-Ray executable.

4. POV-Ray for Windows cannot parse switches enclosed in `""` as switches

The cause of the problem is described in more detail in the comments in the source code of module `POVRay`.

As a work around, in the `windows` version of `mkPovrayImage'`, the POV-Ray command is written to a temporary batch file and it is that batch file which is passed to `runCmd`.

Other matters

In addition to the above, POV-Ray 3.7 includes 'Script I\O Restrictions` which can prevent the writing of files. These need to be disabled in the POV-Ray for Windows GUI (under the Options menu).
2021-10-16 16:20:34 +08:00
Mike Pilgrem
82abb4e434 Add mkColor "none" = FillNone to mkColor
Extending `mkColor :: String -> Texture` to yield `FillNone` for "none" would allow (for example) `withFillColor "none"` to 'turn color off'. For some users, that may be more intuitive and expressive than `withFillOpacity 0.0`.

The Haddock documentation is updated, accordingly.
2021-10-15 11:14:16 +08:00
Mike Pilgrem
ff162b6a33
Add withStrokeOpacity (#222)
Currently, `withFillOpacity` is provided but not the stroke equivalent.

Co-authored-by: David Himmelstrup <lemmih@gmail.com>
2021-10-13 17:16:47 +08:00
David Himmelstrup
a0780c67fc Limit aeson version to <2. 2021-10-13 15:17:08 +08:00
Mike Pilgrem
b36fdb1e1b Update for updated inkscape command line options
The current version of inkscape is 1.1.1. Its command line changed at some point and no longer includes `--without-gui`, `--file` or `--export-png`. See https://inkscape.org/doc/inkscape-man.html.

What was once:
~~~
inkscape --without-gui --file=test.svg --export-png=test.png
~~~

is now:
~~~
inkscape --export-type=png test.svg
~~~
2021-10-09 16:56:55 +08:00
Drew Fenwick
aadf8dcee5
Improve cabal hacking experience (#215)
* Add standard haskell gitignore entries

* Add cradles for using HLS with Cabal

Co-authored-by: David Himmelstrup <lemmih@gmail.com>
2021-09-11 17:43:41 +08:00
dependabot[bot]
5c0eb70584
Bump lodash from 4.17.15 to 4.17.21 in /viewer-elm (#206)
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.21.
- [Release notes](https://github.com/lodash/lodash/releases)
- [Commits](https://github.com/lodash/lodash/compare/4.17.15...4.17.21)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-11 16:42:12 +08:00
dependabot[bot]
3aa746f6d4
Bump glob-parent from 5.1.0 to 5.1.2 in /viewer-elm (#207)
Bumps [glob-parent](https://github.com/gulpjs/glob-parent) from 5.1.0 to 5.1.2.
- [Release notes](https://github.com/gulpjs/glob-parent/releases)
- [Changelog](https://github.com/gulpjs/glob-parent/blob/main/CHANGELOG.md)
- [Commits](https://github.com/gulpjs/glob-parent/compare/v5.1.0...v5.1.2)

---
updated-dependencies:
- dependency-name: glob-parent
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-11 16:42:01 +08:00
dependabot[bot]
f3e5abf416
Bump tar from 4.4.13 to 4.4.19 in /viewer-elm (#214)
Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.13...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-11 16:41:50 +08:00
dependabot[bot]
2118e05558
Bump JamesIves/github-pages-deploy-action from 3.7.1 to 4.1.5 (#217)
Bumps [JamesIves/github-pages-deploy-action](https://github.com/JamesIves/github-pages-deploy-action) from 3.7.1 to 4.1.5.
- [Release notes](https://github.com/JamesIves/github-pages-deploy-action/releases)
- [Commits](https://github.com/JamesIves/github-pages-deploy-action/compare/3.7.1...4.1.5)

---
updated-dependencies:
- dependency-name: JamesIves/github-pages-deploy-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-11 16:41:24 +08:00
dependabot[bot]
ae14f3b09f
Bump jorelali/setup-elm from 2 to 3 (#218)
Bumps [jorelali/setup-elm](https://github.com/jorelali/setup-elm) from 2 to 3.
- [Release notes](https://github.com/jorelali/setup-elm/releases)
- [Commits](https://github.com/jorelali/setup-elm/compare/v2...v3)

---
updated-dependencies:
- dependency-name: jorelali/setup-elm
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-11 16:41:00 +08:00
dependabot[bot]
a7e8751784
Bump actions/setup-node from 1 to 2.4.0 (#219)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 1 to 2.4.0.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v1...v2.4.0)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-11 16:40:48 +08:00
David Himmelstrup
df0f8e591b
Disable building against stackage nightly. (#216)
* Disable nightly build because github no longer accepts comments from forks.

* Disable azure nightly builds.

* Use stack-18 by default.
2021-09-11 13:34:52 +08:00
dependabot-preview[bot]
0f24e76ade
Upgrade to GitHub-native Dependabot (#204)
Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-09-11 12:59:14 +08:00
David Himmelstrup
1232618b15 Fix cert renewal for web.rgeometry.org 2021-08-11 11:04:02 +08:00
David Himmelstrup
8e2b32ba7a Fix doc references. 2021-07-04 23:23:46 +08:00
David Himmelstrup
67b875246d Update documentation links. 2021-07-04 00:25:17 +08:00
David Himmelstrup
cc6a599334 Support the rgeometry backend. 2021-07-03 22:51:01 +08:00
David Himmelstrup
5ea023980f Bump version to 1.1.4.0 v1.1.4.0 2021-03-11 16:21:48 +08:00
David Himmelstrup
5cc9de1acb Update ChangeLog.md 2021-03-11 16:21:33 +08:00
David Himmelstrup
8f36b657b9 Update getting-started section of docs. 2021-03-11 16:18:54 +08:00
Nick Bathum
df8e63e9b6 Typo: text is left-aligned. 2021-03-11 14:59:16 +08:00
David Himmelstrup
7887fef434
Update stack lts version. (#200)
* Use newest reanimate-svg.

* Use lts-16 for docker.
2021-03-11 13:08:14 +08:00
David Himmelstrup
9d9544df7d
Improve README and error handling when encountering cabal bug. (#201) 2021-03-11 13:07:34 +08:00
David Himmelstrup
3a8dc6c769
Use warnings instead of errors for stackage nightly tests. (#202) 2021-03-11 13:06:58 +08:00
David Himmelstrup
0e580e0fdf
Use newest reanimate-svg. (#197) 2021-02-20 18:46:26 +08:00
David Himmelstrup
f4878053b1 reanimateLiveEntry should recurse.
This fixes issue #195.
2021-02-09 20:47:52 +08:00
David Himmelstrup
33056d4372 Update test suite. 2021-02-06 18:44:58 +08:00
kunberg
f75196825b
Change mkRect definition
So that the RectangleNode does not get wrapped in an unnecessary GroupNode.
2021-01-17 08:39:42 +01:00
David Himmelstrup
d321b17818 Fix cabal file. 2021-01-14 16:23:17 +08:00
David Himmelstrup
4e79d3da1e Bump version to 1.1.3.2 v1.1.3.2 2021-01-14 16:20:29 +08:00
David Himmelstrup
091f065e36
Create flag for toggling hgeometry dependency. (#192) 2021-01-14 16:17:21 +08:00
David Himmelstrup
5795a59d44 Fix discord docker build. 2021-01-04 21:37:13 +08:00
David Himmelstrup
62666f0a24 Bump to 1.1.3.1 v1.1.3.1 2021-01-04 16:40:20 +08:00
David Himmelstrup
4187a6562e Update Changelog. 2021-01-04 16:40:02 +08:00
David Himmelstrup
7003c13bac Fix TCP windows issue, fix Firefox on windows. 2021-01-04 16:33:57 +08:00