Skip to content

Commit

Permalink
Add clip region functions
Browse files Browse the repository at this point in the history
  • Loading branch information
jheinen committed Feb 5, 2024
1 parent 6c647e8 commit e4b592c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 19 additions & 1 deletion src/GR.jl
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ export
inqprojectiontype,
setmathfont,
inqmathfont,
setclipregion,
inqclipregion,
# Convenience functions
jlgr,
colormap,
Expand Down Expand Up @@ -2484,7 +2486,7 @@ Set axis titles to be displayed in subsequent axes calls.
**Parameters:**
`x_title`, `y_title`, `z_title` :
The text to be displayed on each axis
The text to be displayed on each axis
"""
function settitles3d(x_title, y_title, z_title)
Expand Down Expand Up @@ -4358,6 +4360,22 @@ function inqmathfont()
return _font[1]
end

function setclipregion(region::Int)
ccall( libGR_ptr(:gr_setclipregion),
Nothing,
(Int32, ),
region)
end

function inqclipregion()
_region = Cint[0]
ccall( libGR_ptr(:gr_inqclipregion),
Nothing,
(Ptr{Cint}, ),
_region)
return _region[1]
end

# JS functions
include("js.jl")

Expand Down
2 changes: 2 additions & 0 deletions src/libgr_syms.jl
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,6 @@
:gr_moveselection
:gr_setmathfont
:gr_inqmathfont
:gr_setclipregion
:gr_inqclipregion
]

0 comments on commit e4b592c

Please sign in to comment.