Skip to content

Commit

Permalink
fix bug in rule, misc doc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cormullion committed Feb 17, 2019
1 parent 62d2358 commit 02b1428
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 4 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Changelog

## [v1.2.0] - 2019-02-15
## [v1.2.0] - 2019-02

### Added

Expand All @@ -11,6 +11,7 @@
### Changed

- tried to fix odd bug in `rule(..., π/2)`
- bug in rule() fixed

### Removed

Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@ Luxor isn't interactive: for interactive graphics, look at [Gtk.jl](https://gith

## How can you contribute?

If you _know any geometry_ you probably know more than me, so there are plenty of improvements to algorithms waiting to be made. There are some _TODO_s sprinkled through the code, but plenty more opportunities for improvement.
If you _know any geometry_ you probably know more than me, so there are plenty of improvements to algorithms waiting to be made. There are some _TODO_ comments sprinkled through the code, but plenty more opportunities for improvement.

_Update the code_, most of which was written for Julia versions 0.2, v0.3 and 0.4 (remember when broadcasting wasn't a thing?) so there are probably many areas where the code could take more advantage of version 1.

There can always be _more tests_, as the present tests are mainly visual, showing that something works, but there should be much more testing of things that shouldn't work - inappropriate input, overlapping polygons, coincident or collinear points, anticlockwise polygons, etc.

More _systematic error-handling_ particularly of geometry errors would be a good idea, rather than sprinkling `throw(error())`s around when things look wrong.

[docs-latest-img]: https://img.shields.io/badge/docs-latest-blue.svg
[docs-latest-url]: http://juliagraphics.github.io/Luxor.jl/latest/
Expand Down
1 change: 0 additions & 1 deletion REQUIRE
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ julia 0.7
Cairo
Juno
Colors
Dates
FileIO
@linux ImageMagick
@mac QuartzImageIO
10 changes: 10 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,16 @@ Luxor isn't interactive: for interactive graphics, look at [Gtk.jl](https://gith

Please submit issues and pull requests on [GitHub](https://github.com/JuliaGraphics/Luxor.jl). Original version by [cormullion](https://github.com/cormullion), much improved with contributions from the Julia community.

## How can you contribute?

If you _know any geometry_ you probably know more than me, so there are plenty of improvements to algorithms waiting to be made. There are some _TODO_ comments sprinkled through the code, but plenty more opportunities for improvement.

_Update the code_, most of which was written for Julia versions 0.2, v0.3 and 0.4 (remember when broadcasting wasn't a thing?) so there are probably many areas where the code could take more advantage of version 1.

There can always be _more tests_, as the present tests are mainly visual, showing that something works, but there should be much more testing of things that shouldn't work - inappropriate input, overlapping polygons, coincident or collinear points, anticlockwise polygons, etc.

More _systematic error-handling_ particularly of geometry errors would be a good idea, rather than sprinkling `throw(error())`s around when things look wrong.

## Installation and basic usage

Install the package using the package manager:
Expand Down
2 changes: 2 additions & 0 deletions docs/src/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,8 @@ although typically this lists only those fonts in `/System/Library/Fonts` and `/

In the Pro API, the default font is Times Roman (on macOS). In the Toy API, the default font is Helvetica (on macOS).

One difference between `settext()` and `text()` (on macOS) is that many more missing Unicode glyphs are automatically substituted by other fonts when you use the former.

Cairo (and hence Luxor) doesn't support emoji currently. 😢

## Text to paths
Expand Down
2 changes: 1 addition & 1 deletion src/basics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ function rule(pos, theta=0.0;
leftside = bbox[1:2]

# ruled line could be as long as the diagonal so add a bit extra
r = boxdiagonal(boundingbox)/2 + 10
r = boxdiagonal(boundingbox) + 10
rcosa = r * cos(theta)
rsina = r * sin(theta)
ruledline = (pos - (rcosa, rsina), pos + (rcosa, rsina))
Expand Down

0 comments on commit 02b1428

Please sign in to comment.