Skip to content

Commit

Permalink
Add Documenter docs (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy authored Dec 8, 2019
1 parent 2893841 commit 75bb1c4
Show file tree
Hide file tree
Showing 7 changed files with 162 additions and 4 deletions.
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,14 @@ script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- if [[ `uname` = "Linux" ]]; then TESTCMD='xvfb-run julia'; else TESTCMD='julia'; fi
- $TESTCMD -e 'using Pkg; Pkg.build(); Pkg.test(coverage=true)'

jobs:
include:
- stage: "Documentation"
julia: 1.3
os: linux
script:
- julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()));
Pkg.instantiate()'
- julia --project=docs/ docs/make.jl
after_success: skip
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Graphics.jl
A holding place for Base graphics

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

[Julia 0.3 Base.Graphics docs](http://docs.julialang.org/en/release-0.3/stdlib/graphics/).
[![Graphics](http://pkg.julialang.org/badges/Graphics_1.0.svg)](http://pkg.julialang.org/?pkg=Graphics&ver=1.0)

See the documentation:

[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://JuliaGraphics.github.io/Graphics.jl/stable)
2 changes: 2 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build/
site/
5 changes: 5 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"

[compat]
Documenter = "0.24"
13 changes: 13 additions & 0 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using Documenter
using Graphics

makedocs(
sitename = "Graphics",
format = Documenter.HTML(prettyurls = get(ENV, "CI", nothing) == "true"),
modules = [Graphics],
pages = ["index.md", "reference.md"]
)

deploydocs(
repo = "github.com/JuliaGraphics/Graphics.jl.git"
)
12 changes: 12 additions & 0 deletions docs/src/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Graphics.jl

Graphics.jl is an [abstraction layer](https://en.wikipedia.org/wiki/Abstraction_layer)
for graphical operations in Julia.
Its goal is to allow developers to write graphical programs in a manner independent
of the particular graphical backend.
One needs to load a backend package that implements the operations in its API;
currently, [Cairo.jl](https://github.com/JuliaGraphics/Cairo.jl)
is the only such backend.

To get an organized overview of the API, try typing `?Graphics` at the Julia REPL.
You can see the same information in greater detail on the next page.
112 changes: 112 additions & 0 deletions docs/src/reference.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Reference

## Geometric primitives

```@docs
Vec2
Point
BoundingBox
```

## Geometry API

```@docs
aspect_ratio
center
deform
diagonal
isinside
shift
height
width
xmin
xmax
ymin
ymax
xrange
yrange
```

## 2d drawing contexts

```@docs
GraphicsDevice
GraphicsContext
creategc
getgc
```

## Coordinate systems

```@docs
set_coordinates
reset_transform
rotate
scale
translate
user_to_device!
device_to_user!
user_to_device_distance!
device_to_user_distance!
user_to_device
device_to_user
```

## Lines

```@docs
set_line_width
set_dash
```

## Colors and painting (drawing attributes)

```@docs
set_source
set_source_rgb
set_source_rgba
save
restore
```

## Clipping

```@docs
clip
clip_preserve
reset_clip
inner_canvas
```

## Paths

```@docs
move_to
line_to
rel_line_to
rel_move_to
new_path
new_sub_path
close_path
arc
```

## High-level paths

```@docs
rectangle
circle
polygon
```

## Fill and stroke

```@docs
fill
fill_preserve
paint
stroke
stroke_preserve
stroke_transformed
stroke_transformed_preserve
```

2 comments on commit 75bb1c4

@timholy
Copy link
Member Author

@timholy timholy commented on 75bb1c4 Dec 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/6405

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v1.0.0 -m "<description of version>" 75bb1c4a0015c337fe39d4ed146e38556df29d25
git push origin v1.0.0

Please sign in to comment.