Skip to content

Commit

Permalink
settext size, remove various doc elements
Browse files Browse the repository at this point in the history
  • Loading branch information
cormullion committed Feb 18, 2019
1 parent 02b1428 commit 54b56c0
Show file tree
Hide file tree
Showing 106 changed files with 14,620 additions and 8,208 deletions.
8 changes: 5 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# Changelog

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

### Added

- more box functions take vertices=true/false
- added setdash(dashes)
- miscellaneous polygon functions tho they're largely untested and needing improvements
- eachindex for Table
- feature gallery illustration

### Changed

- tried to fix odd bug in `rule(..., π/2)`
- bug in rule() fixed
- tried to fix bugs in `rule()`
- settext() now rescales from 96dpi to 72dpi

### Removed

Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@

Luxor is a Julia package for drawing simple static vector graphics. It provides basic drawing functions and utilities for working with shapes, polygons, clipping masks, PNG images, turtle graphics, animations, and shapefiles. Think of it as a high-level and slightly easier to use interface to [Cairo.jl](https://github.com/JuliaLang/Cairo.jl), with shorter names, fewer underscores, default contexts, and simplified functions. In Luxor, the emphasis is on simplicity and ease of use.

!["luxor gallery"](docs/src/assets/figures/luxorgallery.png)

Luxor is thoroughly procedural and static: your code issues a sequence of simple graphics 'commands' until you've completed a drawing, then the results are saved into a PDF, PNG, SVG, or EPS file.

A short tutorial can be found in the documentation. There are some Luxor-related videos on [YouTube](https://www.youtube.com/channel/UCfd52kTA5JpzOEItSqXLQxg), and some Luxor-related blog posts at [cormullion.github.io/](https://cormullion.github.io/).

Luxor isn't interactive: for interactive graphics, look at [Gtk.jl](https://github.com/JuliaGraphics/Gtk.jl), and [GLVisualize](https://github.com/JuliaGL/GLVisualize.jl). [Makie](https://github.com/JuliaPlots/Makie.jl) is worth investigating.


## 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.
Expand Down
13 changes: 8 additions & 5 deletions docs/src/animation.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,11 @@ animate
For best results, you'll have to learn how to use something like `ffmpeg`, with its hundreds of options, which include codec selection, framerate adjustment and color palette tweaking. The `creategif` option for the `animate` function makes an attempt at running `ffmpeg` and assumes that it's already installed. Inside `animate()`, the first pass creates a GIF color palette, the second builds the file:

```julia
run(`ffmpeg -f image2 -i $(tempdirectory)/%10d.png -vf palettegen -y $(seq.stitle)-palette.png`)
run(`ffmpeg -f image2 -i $(tempdirectory)/%10d.png -vf palettegen
-y $(seq.stitle)-palette.png`)

run(`ffmpeg -framerate 30 -f image2 -i $(tempdirectory)/%10d.png -i $(seq.stitle)-palette.png -lavfi paletteuse -y /tmp/$(seq.stitle).gif`)
run(`ffmpeg -framerate 30 -f image2 -i $(tempdirectory)/%10d.png
-i $(seq.stitle)-palette.png -lavfi paletteuse -y /tmp/$(seq.stitle).gif`)
```

Many movie editing programs, such as Final Cut Pro, will also let you import sequences of still images into a movie timeline.
Expand Down Expand Up @@ -179,7 +181,7 @@ end

If you want to pass information to the frame function, such as an array of values, try these:

``
```
function frame(scene, framenumber, datapoints)
...
end
Expand Down Expand Up @@ -207,7 +209,7 @@ ease[in|out|inout][expo|circ|quad|cubic|quart|quint]

and there's an `easingflat()` linear transition.

```@setup draweasingfunctions
```@example
using Luxor # hide
function draweasingfunction(f, pos, w, h)
@layer begin
Expand All @@ -233,7 +235,8 @@ fontsize(10)
fontface("Menlo")
for (pos, n) in t
n > length(Luxor.easingfunctions) && continue
draweasingfunction(Luxor.easingfunctions[n], pos, t.tilewidth-margin, t.tileheight-margin)
draweasingfunction(Luxor.easingfunctions[n], pos,
t.tilewidth-margin, t.tileheight-margin)
end
finish() # hide
Expand Down
Binary file removed docs/src/assets/examples/airport-map.pdf
Binary file not shown.
Loading

0 comments on commit 54b56c0

Please sign in to comment.