Skip to content

Commit

Permalink
Switch to Project, support only Julia 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Dec 5, 2019
1 parent b06d9ba commit 2d24367
Show file tree
Hide file tree
Showing 7 changed files with 45 additions and 44 deletions.
8 changes: 6 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,16 @@ os:
- linux
- osx
julia:
- 0.6
- 0.7
- 1.0
- 1.3
- nightly
matrix:
allow_failures:
- julia: nightly
notifications:
email: false

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)'
22 changes: 22 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name = "Graphics"
uuid = "a2bd30eb-e257-5431-a919-1863eab51364"
version = "1.0.0"

[deps]
Cairo = "159f3aea-2a34-519c-b102-8c37f9878175"
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
NaNMath = "77ba4419-2d1f-58cd-9bb1-8ffee604a2e3"

[compat]
NaNMath = "0.3.3"
julia = "1"

[extras]
Cairo = "159f3aea-2a34-519c-b102-8c37f9878175"
Gtk = "4c0ca9eb-093a-5379-98c5-f87ac0bbbf44"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Cairo", "Gtk", "Test"]
4 changes: 0 additions & 4 deletions REQUIRE

This file was deleted.

8 changes: 1 addition & 7 deletions src/Graphics.jl
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
__precompile__()

module Graphics

using Compat
using Compat.LinearAlgebra
using Colors
using NaNMath

import Base: +, -, *, /, &, fill
import Compat.LinearAlgebra: norm
import LinearAlgebra: norm

"""
Graphics defines an API for drawing in two dimensions.
Expand Down Expand Up @@ -477,6 +473,4 @@ function polygon(self::GraphicsContext, points::AbstractVector)
close_path(self)
end

include("deprecations.jl")

end # module
13 changes: 0 additions & 13 deletions src/deprecations.jl

This file was deleted.

1 change: 0 additions & 1 deletion test/REQUIRE

This file was deleted.

33 changes: 16 additions & 17 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
using Graphics
using Compat
using Compat.Test
using Compat.LinearAlgebra
using LinearAlgebra
using Test

@testset "Geometry" begin
## Point-vector identity (typealias)
Expand Down Expand Up @@ -84,17 +83,17 @@ using Compat.LinearAlgebra
@test isinside(BBT_1, Point(1, 3)) == false
end

# using Gtk.ShortNames, Cairo

# @testset "Canvas" begin
# win = Window() |> (cnvs = Canvas(300, 280))
# draw(cnvs) do c
# set_coords(getgc(cnvs), BoundingBox(0, 1, 0, 1))
# end
# showall(win)
# sleep(0.5)
# mtrx = Cairo.get_matrix(getgc(cnvs))
# @test mtrx.xx == 300
# @test mtrx.yy == 280
# @test mtrx.xy == mtrx.yx == mtrx.x0 == mtrx.y0 == 0
# end
using Gtk.ShortNames, Cairo

@testset "Canvas" begin
win = Window() |> (cnvs = Canvas(300, 280))
draw(cnvs) do c
set_coordinates(getgc(cnvs), BoundingBox(0, 1, 0, 1))
end
Gtk.showall(win)
sleep(0.5)
mtrx = Cairo.get_matrix(getgc(cnvs))
@test mtrx.xx == 300
@test mtrx.yy == 280
@test mtrx.xy == mtrx.yx == mtrx.x0 == mtrx.y0 == 0
end

0 comments on commit 2d24367

Please sign in to comment.