IUP

Check-in [3ebc96c632]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Corrected plot sample insertion index argument checks
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 3ebc96c63226dac32ac5c68d5ca9eff00f3e9b45
User & Date: murphy 2015-05-01 22:50:46.487
Context
2015-05-01
23:28
Corrected type of dpi parameter for mglplot-paint-to from int to double check-in: 2b332f9c40 user: murphy tags: trunk
22:50
Corrected plot sample insertion index argument checks check-in: 3ebc96c632 user: murphy tags: trunk
22:49
Corrected label constructor argument name check-in: 6c01896816 user: murphy tags: trunk
Changes
Side-by-Side Diff Ignore Whitespace Patch
Changes to chicken/iup-plot.scm.
36
37
38
39
40
41
42
43

44
45
46

47
48
49
50
51
52
53
36
37
38
39
40
41
42

43
44
45

46
47
48
49
50
51
52
53







-
+


-
+







  (letrec ([append/real (foreign-lambda void "IupPlotAdd" nonnull-ihandle double double)]
           [append/string (foreign-lambda void "IupPlotAddStr" nonnull-ihandle c-string double)]
           [insert/real (foreign-lambda void "IupPlotInsert" nonnull-ihandle int int double double)]
           [insert/string (foreign-lambda void "IupPlotInsertStr" nonnull-ihandle int int c-string double)]
           [current-index (lambda (handle) (string->number (attribute handle 'current)))])
    (lambda (handle x y #!optional [sample-index #f] [index #f])
      (if (string? x)
          (if index
          (if sample-index
              (insert/string handle (or index (current-index handle)) sample-index x y)
              (append/string handle x y))
          (if index
          (if sample-index
              (insert/real handle (or index (current-index handle)) sample-index x y)
              (append/real handle x y))))))

(define plot-x/y->pixel-x/y
	(letrec ([transform (foreign-lambda void "IupPlotTransform" nonnull-ihandle double double (c-pointer double) (c-pointer double))])
		(lambda (handle plot-x plot-y)
			(let-location ([pixel-x int 0] [pixel-y int 0])
Changes to chicken/iup-pplot.scm.
36
37
38
39
40
41
42
43

44
45
46

47
48
49
50
51
52
53
36
37
38
39
40
41
42

43
44
45

46
47
48
49
50
51
52
53







-
+


-
+







  (letrec ([append/real (foreign-lambda void "IupPPlotAdd" nonnull-ihandle float float)]
           [append/string (foreign-lambda void "IupPPlotAddStr" nonnull-ihandle c-string float)]
           [insert/real (foreign-lambda void "IupPPlotInsert" nonnull-ihandle int int float float)]
           [insert/string (foreign-lambda void "IupPPlotInsertStr" nonnull-ihandle int int c-string float)]
           [current-index (lambda (handle) (string->number (attribute handle 'current)))])
    (lambda (handle x y #!optional [sample-index #f] [index #f])
      (if (string? x)
          (if index
          (if sample-index
              (insert/string handle (or index (current-index handle)) sample-index x y)
              (append/string handle x y))
          (if index
          (if sample-index
              (insert/real handle (or index (current-index handle)) sample-index x y)
              (append/real handle x y))))))

(define pplot-x/y->pixel-x/y
	(letrec ([transform (foreign-lambda void "IupPPlotTransform" nonnull-ihandle float float (c-pointer int) (c-pointer int))])
		(lambda (handle pplot-x pplot-y)
			(let-location ([pixel-x int 0] [pixel-y int 0])