Skip to content

Commit

Permalink
changed cclipper -> libcclipper following the change in Clipper.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
Eunjong Kim committed Aug 20, 2020
1 parent 72f0125 commit 31a5c0a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Devices.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include("units.jl")

import StaticArrays
import Clipper
import Clipper: cclipper
import Clipper: libcclipper
import FileIO: save, load

import Base: length, show, eltype, intersect!
Expand Down
8 changes: 4 additions & 4 deletions src/polygons.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import Unitful
import Unitful: Quantity, Length, dimension, unit, ustrip, uconvert, °
using ..Points
using ..Rectangles
import ..cclipper
import ..libcclipper

import IntervalSets.(..)
import IntervalSets.endpoints
Expand Down Expand Up @@ -258,7 +258,7 @@ end

function add_path!(c::Clipper.Clip, path::Vector{Point{T}}, polyType::Clipper.PolyType,
closed::Bool) where {T<:Union{Int64, Unitful.Quantity{Int64}}}
ccall((:add_path, cclipper), Cuchar, (Ptr{Cvoid}, Ptr{Clipper.IntPoint}, Csize_t, Cint, Cuchar),
ccall((:add_path, libcclipper), Cuchar, (Ptr{Cvoid}, Ptr{Clipper.IntPoint}, Csize_t, Cint, Cuchar),
c.clipper_ptr,
path,
length(path),
Expand Down Expand Up @@ -403,7 +403,7 @@ end

function add_path!(c::Clipper.ClipperOffset, path::Vector{Point{T}},
joinType::Clipper.JoinType, endType::Clipper.EndType) where {T<:Union{Int64, Unitful.Quantity{Int64}}}
ccall((:add_offset_path, cclipper), Cvoid, (Ptr{Cvoid}, Ptr{Clipper.IntPoint}, Csize_t, Cint, Cint),
ccall((:add_offset_path, libcclipper), Cvoid, (Ptr{Cvoid}, Ptr{Clipper.IntPoint}, Csize_t, Cint, Cint),
c.clipper_ptr,
path,
length(path),
Expand Down Expand Up @@ -506,7 +506,7 @@ Returns 1 if the points in the polygon contour are going counter-clockwise, -1 i
Clipper considers clockwise-oriented polygons to be holes for some polygon fill types.
"""
function orientation(p::Polygon)
ccall((:orientation, cclipper), Cuchar, (Ptr{Clipper.IntPoint}, Csize_t),
ccall((:orientation, libcclipper), Cuchar, (Ptr{Clipper.IntPoint}, Csize_t),
reinterpret(Clipper.IntPoint, p.p),length(p.p)) == 1 ? 1 : -1
end

Expand Down

0 comments on commit 31a5c0a

Please sign in to comment.