@@ -112,7 +112,13 @@ drawImage (Window wfptr) (Array fptr) cell =
112
112
-- @
113
113
-- >>> drawPlot window ('constant' \@'Int' 1) ('constant' \@'Int' 1) ('Cell' 10 10 "test" 'ColorMapSpectrum')
114
114
-- @
115
- drawPlot :: Window -> Array a -> Array a -> Cell -> IO ()
115
+ --
116
+ drawPlot
117
+ :: Window
118
+ -> Array a
119
+ -> Array a
120
+ -> Cell
121
+ -> IO ()
116
122
drawPlot (Window w) (Array fptr1) (Array fptr2) cell =
117
123
mask_ $ withForeignPtr fptr1 $ \ ptr1 ->
118
124
withForeignPtr fptr2 $ \ ptr2 ->
@@ -122,7 +128,11 @@ drawPlot (Window w) (Array fptr1) (Array fptr2) cell =
122
128
throwAFError =<< af_draw_plot wptr ptr1 ptr2 cellPtr
123
129
free cellPtr
124
130
125
- drawPlot3 :: Window -> Array a -> Cell -> IO ()
131
+ drawPlot3
132
+ :: Window
133
+ -> Array a
134
+ -> Cell
135
+ -> IO ()
126
136
drawPlot3 (Window w) (Array fptr) cell =
127
137
mask_ $ withForeignPtr fptr $ \ aptr ->
128
138
withForeignPtr w $ \ wptr ->
@@ -131,7 +141,11 @@ drawPlot3 (Window w) (Array fptr) cell =
131
141
throwAFError =<< af_draw_plot3 wptr aptr cellPtr
132
142
free cellPtr
133
143
134
- drawPlotNd :: Window -> Array a -> Cell -> IO ()
144
+ drawPlotNd
145
+ :: Window
146
+ -> Array a
147
+ -> Cell
148
+ -> IO ()
135
149
drawPlotNd (Window w) (Array fptr) cell =
136
150
mask_ $ withForeignPtr fptr $ \ aptr ->
137
151
withForeignPtr w $ \ wptr ->
@@ -140,7 +154,12 @@ drawPlotNd (Window w) (Array fptr) cell =
140
154
throwAFError =<< af_draw_plot_nd wptr aptr cellPtr
141
155
free cellPtr
142
156
143
- drawPlot2d :: Window -> Array a -> Array a -> Cell -> IO ()
157
+ drawPlot2d
158
+ :: Window
159
+ -> Array a
160
+ -> Array a
161
+ -> Cell
162
+ -> IO ()
144
163
drawPlot2d (Window w) (Array fptr1) (Array fptr2) cell =
145
164
mask_ $ withForeignPtr fptr1 $ \ ptr1 ->
146
165
withForeignPtr fptr2 $ \ ptr2 ->
@@ -150,7 +169,13 @@ drawPlot2d (Window w) (Array fptr1) (Array fptr2) cell =
150
169
throwAFError =<< af_draw_plot_2d wptr ptr1 ptr2 cellPtr
151
170
free cellPtr
152
171
153
- drawPlot3d :: Window -> Array a -> Array a -> Array a -> Cell -> IO ()
172
+ drawPlot3d
173
+ :: Window
174
+ -> Array a
175
+ -> Array a
176
+ -> Array a
177
+ -> Cell
178
+ -> IO ()
154
179
drawPlot3d (Window w) (Array fptr1) (Array fptr2) (Array fptr3) cell =
155
180
mask_ $ withForeignPtr fptr1 $ \ ptr1 ->
156
181
withForeignPtr fptr2 $ \ ptr2 ->
@@ -161,7 +186,13 @@ drawPlot3d (Window w) (Array fptr1) (Array fptr2) (Array fptr3) cell =
161
186
throwAFError =<< af_draw_plot_3d wptr ptr1 ptr2 ptr3 cellPtr
162
187
free cellPtr
163
188
164
- drawScatter :: Window -> Array a -> Array a -> MarkerType -> Cell -> IO ()
189
+ drawScatter
190
+ :: Window
191
+ -> Array a
192
+ -> Array a
193
+ -> MarkerType
194
+ -> Cell
195
+ -> IO ()
165
196
drawScatter (Window w) (Array fptr1) (Array fptr2) (fromMarkerType -> m) cell =
166
197
mask_ $ withForeignPtr fptr1 $ \ ptr1 ->
167
198
withForeignPtr fptr2 $ \ ptr2 ->
@@ -171,7 +202,12 @@ drawScatter (Window w) (Array fptr1) (Array fptr2) (fromMarkerType -> m) cell =
171
202
throwAFError =<< af_draw_scatter wptr ptr1 ptr2 m cellPtr
172
203
free cellPtr
173
204
174
- drawScatter3 :: Window -> Array a -> MarkerType -> Cell -> IO ()
205
+ drawScatter3
206
+ :: Window
207
+ -> Array a
208
+ -> MarkerType
209
+ -> Cell
210
+ -> IO ()
175
211
drawScatter3 (Window w) (Array fptr1) (fromMarkerType -> m) cell =
176
212
mask_ $ withForeignPtr fptr1 $ \ ptr1 ->
177
213
withForeignPtr w $ \ wptr ->
@@ -180,8 +216,12 @@ drawScatter3 (Window w) (Array fptr1) (fromMarkerType -> m) cell =
180
216
throwAFError =<< af_draw_scatter3 wptr ptr1 m cellPtr
181
217
free cellPtr
182
218
183
-
184
- drawScatterNd :: Window -> Array a -> MarkerType -> Cell -> IO ()
219
+ drawScatterNd
220
+ :: Window
221
+ -> Array a
222
+ -> MarkerType
223
+ -> Cell
224
+ -> IO ()
185
225
drawScatterNd (Window w) (Array fptr1) (fromMarkerType -> m) cell =
186
226
mask_ $ withForeignPtr fptr1 $ \ ptr1 ->
187
227
withForeignPtr w $ \ wptr ->
@@ -190,8 +230,13 @@ drawScatterNd (Window w) (Array fptr1) (fromMarkerType -> m) cell =
190
230
throwAFError =<< af_draw_scatter_nd wptr ptr1 m cellPtr
191
231
free cellPtr
192
232
193
-
194
- drawScatter2d :: Window -> Array a -> Array a -> MarkerType -> Cell -> IO ()
233
+ drawScatter2d
234
+ :: Window
235
+ -> Array a
236
+ -> Array a
237
+ -> MarkerType
238
+ -> Cell
239
+ -> IO ()
195
240
drawScatter2d (Window w) (Array fptr1) (Array fptr2) (fromMarkerType -> m) cell =
196
241
mask_ $ withForeignPtr fptr1 $ \ ptr1 ->
197
242
withForeignPtr w $ \ wptr ->
@@ -201,8 +246,14 @@ drawScatter2d (Window w) (Array fptr1) (Array fptr2) (fromMarkerType -> m) cell
201
246
throwAFError =<< af_draw_scatter_2d wptr ptr1 ptr2 m cellPtr
202
247
free cellPtr
203
248
204
-
205
- drawScatter3d :: Window -> Array a -> Array a -> Array a -> MarkerType -> Cell -> IO ()
249
+ drawScatter3d
250
+ :: Window
251
+ -> Array a
252
+ -> Array a
253
+ -> Array a
254
+ -> MarkerType
255
+ -> Cell
256
+ -> IO ()
206
257
drawScatter3d (Window w) (Array fptr1) (Array fptr2) (Array fptr3) (fromMarkerType -> m) cell =
207
258
mask_ $ withForeignPtr fptr1 $ \ ptr1 ->
208
259
withForeignPtr w $ \ wptr ->
@@ -213,17 +264,27 @@ drawScatter3d (Window w) (Array fptr1) (Array fptr2) (Array fptr3) (fromMarkerTy
213
264
throwAFError =<< af_draw_scatter_3d wptr ptr1 ptr2 ptr3 m cellPtr
214
265
free cellPtr
215
266
216
-
217
- drawHistogram :: Window -> Array a -> Double -> Double -> Cell -> IO ()
267
+ drawHistogram
268
+ :: Window
269
+ -> Array a
270
+ -> Double
271
+ -> Double
272
+ -> Cell
273
+ -> IO ()
218
274
drawHistogram (Window w) (Array fptr1) minval maxval cell =
219
275
mask_ $ withForeignPtr fptr1 $ \ ptr1 ->
220
276
withForeignPtr w $ \ wptr ->
221
277
alloca $ \ cellPtr -> do
222
278
poke cellPtr =<< cellToAFCell cell
223
279
throwAFError =<< af_draw_hist wptr ptr1 minval maxval cellPtr
224
280
225
-
226
- drawSurface :: Window -> Array a -> Array a -> Array a -> Cell -> IO ()
281
+ drawSurface
282
+ :: Window
283
+ -> Array a
284
+ -> Array a
285
+ -> Array a
286
+ -> Cell
287
+ -> IO ()
227
288
drawSurface (Window w) (Array fptr1) (Array fptr2) (Array fptr3) cell =
228
289
mask_ $ withForeignPtr fptr1 $ \ ptr1 ->
229
290
withForeignPtr w $ \ wptr ->
@@ -235,7 +296,12 @@ drawSurface (Window w) (Array fptr1) (Array fptr2) (Array fptr3) cell =
235
296
free cellPtr
236
297
237
298
238
- drawVectorFieldND :: Window -> Array a -> Array a -> Cell -> IO ()
299
+ drawVectorFieldND
300
+ :: Window
301
+ -> Array a
302
+ -> Array a
303
+ -> Cell
304
+ -> IO ()
239
305
drawVectorFieldND (Window w) (Array fptr1) (Array fptr2) cell =
240
306
mask_ $ withForeignPtr fptr1 $ \ ptr1 ->
241
307
withForeignPtr fptr2 $ \ ptr2 ->
@@ -246,7 +312,16 @@ drawVectorFieldND (Window w) (Array fptr1) (Array fptr2) cell =
246
312
free cellPtr
247
313
248
314
249
- drawVectorField3d :: Window -> Array a -> Array a -> Array a -> Array a -> Array a -> Array a -> Cell -> IO ()
315
+ drawVectorField3d
316
+ :: Window
317
+ -> Array a
318
+ -> Array a
319
+ -> Array a
320
+ -> Array a
321
+ -> Array a
322
+ -> Array a
323
+ -> Cell
324
+ -> IO ()
250
325
drawVectorField3d (Window w) (Array fptr1) (Array fptr2) (Array fptr3)
251
326
(Array fptr4) (Array fptr5) (Array fptr6) cell =
252
327
mask_ $ do
@@ -262,8 +337,14 @@ drawVectorField3d (Window w) (Array fptr1) (Array fptr2) (Array fptr3)
262
337
throwAFError =<< af_draw_vector_field_3d wptr ptr1 ptr2 ptr3 ptr4 ptr5 ptr6 cellPtr
263
338
free cellPtr
264
339
265
-
266
- drawVectorField2d :: Window -> Array a -> Array a -> Array a -> Array a -> Cell -> IO ()
340
+ drawVectorField2d
341
+ :: Window
342
+ -> Array a
343
+ -> Array a
344
+ -> Array a
345
+ -> Array a
346
+ -> Cell
347
+ -> IO ()
267
348
drawVectorField2d (Window w) (Array fptr1) (Array fptr2) (Array fptr3) (Array fptr4) cell =
268
349
mask_ $ do
269
350
withForeignPtr w $ \ wptr ->
@@ -276,14 +357,24 @@ drawVectorField2d (Window w) (Array fptr1) (Array fptr2) (Array fptr3) (Array fp
276
357
throwAFError =<< af_draw_vector_field_2d wptr ptr1 ptr2 ptr3 ptr4 cellPtr
277
358
free cellPtr
278
359
279
-
280
- grid :: Window -> Int -> Int -> IO ()
360
+ grid
361
+ :: Window
362
+ -> Int
363
+ -> Int
364
+ -> IO ()
281
365
grid (Window w) (fromIntegral -> rows) (fromIntegral -> cols) =
282
366
mask_ . withForeignPtr w $ \ wptr ->
283
367
throwAFError =<< af_grid wptr rows cols
284
368
285
369
286
- setAxesLimitsCompute :: Window -> Array a -> Array a -> Array a -> Bool -> Cell -> IO ()
370
+ setAxesLimitsCompute
371
+ :: Window
372
+ -> Array a
373
+ -> Array a
374
+ -> Array a
375
+ -> Bool
376
+ -> Cell
377
+ -> IO ()
287
378
setAxesLimitsCompute (Window w) (Array fptr1) (Array fptr2) (Array fptr3) (fromIntegral . fromEnum -> exact) cell =
288
379
mask_ $ do
289
380
withForeignPtr w $ \ wptr ->
@@ -296,7 +387,15 @@ setAxesLimitsCompute (Window w) (Array fptr1) (Array fptr2) (Array fptr3) (fromI
296
387
free cellPtr
297
388
298
389
299
- setAxesLimits2d :: Window -> Float -> Float -> Float -> Float -> Bool -> Cell -> IO ()
390
+ setAxesLimits2d
391
+ :: Window
392
+ -> Float
393
+ -> Float
394
+ -> Float
395
+ -> Float
396
+ -> Bool
397
+ -> Cell
398
+ -> IO ()
300
399
setAxesLimits2d (Window w) xmin xmax ymin ymax (fromIntegral . fromEnum -> exact) cell =
301
400
mask_ $ do
302
401
withForeignPtr w $ \ wptr ->
@@ -306,7 +405,17 @@ setAxesLimits2d (Window w) xmin xmax ymin ymax (fromIntegral . fromEnum -> exact
306
405
free cellPtr
307
406
308
407
309
- setAxesLimits3d :: Window -> Float -> Float -> Float -> Float -> Float -> Float -> Bool -> Cell -> IO ()
408
+ setAxesLimits3d
409
+ :: Window
410
+ -> Float
411
+ -> Float
412
+ -> Float
413
+ -> Float
414
+ -> Float
415
+ -> Float
416
+ -> Bool
417
+ -> Cell
418
+ -> IO ()
310
419
setAxesLimits3d (Window w) xmin xmax ymin ymax zmin zmax (fromIntegral . fromEnum -> exact) cell =
311
420
mask_ $ do
312
421
withForeignPtr w $ \ wptr ->
@@ -315,9 +424,13 @@ setAxesLimits3d (Window w) xmin xmax ymin ymax zmin zmax (fromIntegral . fromEnu
315
424
throwAFError =<< af_set_axes_limits_3d wptr xmin xmax ymin ymax zmin zmax exact cellPtr
316
425
free cellPtr
317
426
318
-
319
-
320
- setAxesTitles :: Window -> String -> String -> String -> Cell -> IO ()
427
+ setAxesTitles
428
+ :: Window
429
+ -> String
430
+ -> String
431
+ -> String
432
+ -> Cell
433
+ -> IO ()
321
434
setAxesTitles (Window w) x y z cell =
322
435
mask_ $ do
323
436
withForeignPtr w $ \ wptr ->
@@ -329,16 +442,19 @@ setAxesTitles (Window w) x y z cell =
329
442
throwAFError =<< af_set_axes_titles wptr xstr ystr zstr cellPtr
330
443
free cellPtr
331
444
332
-
333
- showWindow :: Window -> IO ()
445
+ showWindow
446
+ :: Window
447
+ -> IO ()
334
448
showWindow = (`opw` af_show)
335
449
336
-
337
450
isWindowClosed :: Window -> IO Bool
338
451
isWindowClosed w =
339
452
toEnum . fromIntegral
340
453
<$> (w `opw1` af_is_window_closed)
341
454
342
455
343
- setVisibility :: Window -> Bool -> IO ()
456
+ setVisibility
457
+ :: Window
458
+ -> Bool
459
+ -> IO ()
344
460
setVisibility w (fromIntegral . fromEnum -> b) = w `opw` (`af_set_visibility` b)
0 commit comments