Skip to content

Commit

Permalink
misc changes:
Browse files Browse the repository at this point in the history
  • Loading branch information
cormullion committed Feb 26, 2022
1 parent cf4ee3d commit cf78a8f
Show file tree
Hide file tree
Showing 13 changed files with 214 additions and 188 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
# Changelog

## [v3.1.0] - ...
## [v3.1.0] - 2022-02-06

### Added

- drawpath() progressive path drawing
- trimbezier() and splitbezier()
- pathsample() like polysample() for paths, but different
- more LaTeX characters (thanks @davibarreira!)
- AbstractPoint (thanks Giovanni @gpucce!)

### Changed

- docs now forcepush to gh-pages
- latex text strings can also be paths
- latex text strings can also be paths (except the new LaTeX characters)
- Bezier arrows are now a bit tidier might fix #200

### Removed
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
- US-spelling (eg center/color)
- position arguments should be eg `(pt::Point)` not just the Cairo.jl based `(xc::Real, yc::Real)`
- please don't autoformat
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The Luxor.jl package is licensed under the MIT "Expat" License:

> Copyright (c) 2017-2022: cormullion.
> Copyright (c) 2017-2022: cormullion and contributors.
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
Expand Down
2 changes: 2 additions & 0 deletions docs/src/explanation/pathspolygons.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ end
d # hide
```

See also [Stored paths](@ref).

## Polygons

A polygon appears as a plain Vector (Array) of `Point`s.
Expand Down
21 changes: 12 additions & 9 deletions docs/src/explanation/perfectpixels.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,22 @@

## Anti-aliasing

The process of converting precise graphic shapes to a grid of
pixels is automatically performed by Luxor when you
save the drawing as a PNG file. If you make an SVG or PDF
drawing, this process is carried out at a later stage, by the application you
use to view or display the file.
The process of converting precise graphic shapes to a grid
of pixels is automatically performed by Luxor when you save
the drawing as a PNG file. If you make an SVG or PDF
drawing, this process is carried out at a later stage, by
the application you use to view or display the file.

It's usually better to defer this conversion as long as
possible. Of course, eventually - unless you're using a pen plotter or
laser cutter - your smooth outlines will have to be
converted ("rasterized") to a grid of colored pixels for
possible. Of course, eventually - unless you're using a pen
plotter or laser cutter - your smooth outlines will have to
be converted ("rasterized") to a grid of colored pixels for
their final journey to the analogue world.

The conversion to PNG includes "anti-aliasing", which gradually changes the colors of pixels along a boundary so as to avoid the grid-like "staircase" effect. You can, to some extent, adjust the amount of anti-aliasing used when
The conversion to PNG includes "anti-aliasing", which
gradually changes the colors of pixels along a boundary so
as to avoid the grid-like "staircase" effect. You can, to
some extent, adjust the amount of anti-aliasing used when
you make drawings in Luxor.

```@setup draw_matrix
Expand Down
23 changes: 18 additions & 5 deletions docs/src/howto/simplegraphics.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ DocTestSetup = quote
# Simple graphics

In Luxor, there are different ways of working with graphical
items. You can either draw them immediately, ie place them
on the drawing, and they're then fixed. Or you can construct
geometric objects containing lists of points for further
processing. Watch out for a `vertices=true` option, which
returns coordinate data rather than drawing a shape.
items:

- You can either draw them immediately, ie create lines and curves to form a **path** on the drawing, paint them, and they're then fixed.

- You can construct geometric objects containing lists of
points for further processing. Watch out for a
`vertices=true` option, which returns coordinate data
rather than drawing a path shape.

- You can combine these two approaches: create a path from lines and curves (and jumps), then store the path, ready for drawing later on.

## Rectangles and boxes

Expand Down Expand Up @@ -1222,6 +1227,14 @@ active. You might want to use `newpath()` to start a new
one. The `drawpath()` function will start a new path but
there is an option to continue drawing on the existing one.

Other functions for working with stored paths include:

- [`drawpath`](@ref) draw part of a path

- [`pathsample`](@ref) resample the path

- [`pathlength`](@ref) find the length of a path

## Julia logos

A couple of functions, [`julialogo`](@ref) and [`juliacircles`](@ref), provide you with instant access to the Julia logo and the three colored circles/dots:
Expand Down
Loading

0 comments on commit cf78a8f

Please sign in to comment.