#include #include -- | See the Potrace API documentation at . module Bindings.Potrace where #strict_import -- tracing parameters #num POTRACE_TURNPOLICY_BLACK #num POTRACE_TURNPOLICY_WHITE #num POTRACE_TURNPOLICY_LEFT #num POTRACE_TURNPOLICY_RIGHT #num POTRACE_TURNPOLICY_MINORITY #num POTRACE_TURNPOLICY_MAJORITY #num POTRACE_TURNPOLICY_RANDOM #starttype struct potrace_progress_s #field callback , FunPtr (CDouble -> Ptr () -> IO ()) #field data , Ptr () #field min , CDouble #field max , CDouble #field epsilon , CDouble #stoptype #synonym_t potrace_progress_t , #starttype struct potrace_param_s #field turdsize , CInt #field turnpolicy , CInt #field alphamax , CDouble #field opticurve , CInt #field opttolerance , CDouble #field progress , #stoptype #synonym_t potrace_param_t , -- bitmaps #synonym_t potrace_word , CULong #starttype struct potrace_bitmap_s #field w , CInt #field h , CInt #field dy , CInt #field map , Ptr #stoptype #synonym_t potrace_bitmap_t , -- curves #starttype struct potrace_dpoint_s #field x , CDouble #field y , CDouble #stoptype #synonym_t potrace_dpoint_t , #num POTRACE_CURVETO #num POTRACE_CORNER #starttype struct potrace_curve_s #field n , CInt #field tag , Ptr CInt #field c , Ptr -- | NB: @c@ is actually declared as -- -- > potrace_dpoint_t (*c)[3] -- -- To access what would be @c[n][i]@ in C, -- use instead @peekElemOff c (3 * n + i)@. #stoptype #synonym_t potrace_curve_t , #opaque_t struct potrace_privpath_s #starttype struct potrace_path_s #field area , CInt #field sign , CInt #field curve , #field next , Ptr #field childlist , Ptr #field sibling , Ptr #field priv , Ptr #stoptype #synonym_t potrace_path_t , -- Potrace state #num POTRACE_STATUS_OK #num POTRACE_STATUS_INCOMPLETE #opaque_t struct potrace_privstate_s #starttype struct potrace_state_s #field status , CInt #field plist , Ptr #field priv , Ptr #stoptype #synonym_t potrace_state_t , -- API functions #ccall potrace_param_default , IO (Ptr ) #ccall potrace_param_free , Ptr -> IO () #ccall potrace_trace , Ptr -> Ptr -> IO (Ptr ) #ccall potrace_state_free , Ptr -> IO () #ccall potrace_version , IO CString