Skip to content

Commit 75bb1c4

Browse files
authored
Add Documenter docs (#17)
1 parent 2893841 commit 75bb1c4

File tree

7 files changed

+162
-4
lines changed

7 files changed

+162
-4
lines changed

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,14 @@ script:
1616
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
1717
- if [[ `uname` = "Linux" ]]; then TESTCMD='xvfb-run julia'; else TESTCMD='julia'; fi
1818
- $TESTCMD -e 'using Pkg; Pkg.build(); Pkg.test(coverage=true)'
19+
20+
jobs:
21+
include:
22+
- stage: "Documentation"
23+
julia: 1.3
24+
os: linux
25+
script:
26+
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
27+
Pkg.instantiate()'
28+
- julia --project=docs/ docs/make.jl
29+
after_success: skip

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# Graphics.jl
2-
A holding place for Base graphics
32

4-
[![Graphics](http://pkg.julialang.org/badges/Graphics_0.3.svg)](http://pkg.julialang.org/?pkg=Graphics&ver=0.3)
5-
[![Graphics](http://pkg.julialang.org/badges/Graphics_0.4.svg)](http://pkg.julialang.org/?pkg=Graphics&ver=0.4)
3+
Graphics.jl is an [abstraction layer](https://en.wikipedia.org/wiki/Abstraction_layer)
4+
for graphical operations in Julia.
65

7-
[Julia 0.3 Base.Graphics docs](http://docs.julialang.org/en/release-0.3/stdlib/graphics/).
6+
[![Graphics](http://pkg.julialang.org/badges/Graphics_1.0.svg)](http://pkg.julialang.org/?pkg=Graphics&ver=1.0)
7+
8+
See the documentation:
9+
10+
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaGraphics.github.io/Graphics.jl/stable)

docs/.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build/
2+
site/

docs/Project.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[deps]
2+
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
4+
[compat]
5+
Documenter = "0.24"

docs/make.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
using Documenter
2+
using Graphics
3+
4+
makedocs(
5+
sitename = "Graphics",
6+
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"),
7+
modules = [Graphics],
8+
pages = ["index.md", "reference.md"]
9+
)
10+
11+
deploydocs(
12+
repo = "github.com/JuliaGraphics/Graphics.jl.git"
13+
)

docs/src/index.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Graphics.jl
2+
3+
Graphics.jl is an [abstraction layer](https://en.wikipedia.org/wiki/Abstraction_layer)
4+
for graphical operations in Julia.
5+
Its goal is to allow developers to write graphical programs in a manner independent
6+
of the particular graphical backend.
7+
One needs to load a backend package that implements the operations in its API;
8+
currently, [Cairo.jl](https://github.com/JuliaGraphics/Cairo.jl)
9+
is the only such backend.
10+
11+
To get an organized overview of the API, try typing `?Graphics` at the Julia REPL.
12+
You can see the same information in greater detail on the next page.

docs/src/reference.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Reference
2+
3+
## Geometric primitives
4+
5+
```@docs
6+
Vec2
7+
Point
8+
BoundingBox
9+
```
10+
11+
## Geometry API
12+
13+
```@docs
14+
aspect_ratio
15+
center
16+
deform
17+
diagonal
18+
isinside
19+
shift
20+
height
21+
width
22+
xmin
23+
xmax
24+
ymin
25+
ymax
26+
xrange
27+
yrange
28+
```
29+
30+
## 2d drawing contexts
31+
32+
```@docs
33+
GraphicsDevice
34+
GraphicsContext
35+
creategc
36+
getgc
37+
```
38+
39+
## Coordinate systems
40+
41+
```@docs
42+
set_coordinates
43+
reset_transform
44+
rotate
45+
scale
46+
translate
47+
user_to_device!
48+
device_to_user!
49+
user_to_device_distance!
50+
device_to_user_distance!
51+
user_to_device
52+
device_to_user
53+
```
54+
55+
## Lines
56+
57+
```@docs
58+
set_line_width
59+
set_dash
60+
```
61+
62+
## Colors and painting (drawing attributes)
63+
64+
```@docs
65+
set_source
66+
set_source_rgb
67+
set_source_rgba
68+
save
69+
restore
70+
```
71+
72+
## Clipping
73+
74+
```@docs
75+
clip
76+
clip_preserve
77+
reset_clip
78+
inner_canvas
79+
```
80+
81+
## Paths
82+
83+
```@docs
84+
move_to
85+
line_to
86+
rel_line_to
87+
rel_move_to
88+
new_path
89+
new_sub_path
90+
close_path
91+
arc
92+
```
93+
94+
## High-level paths
95+
96+
```@docs
97+
rectangle
98+
circle
99+
polygon
100+
```
101+
102+
## Fill and stroke
103+
104+
```@docs
105+
fill
106+
fill_preserve
107+
paint
108+
stroke
109+
stroke_preserve
110+
stroke_transformed
111+
stroke_transformed_preserve
112+
```

0 commit comments

Comments
 (0)