scx/scheme/xlib/graphics.scm

209 lines
6.1 KiB
Scheme
Raw Normal View History

2001-07-04 10:19:38 -04:00
;; author -> Norbert Freudemann
;; creation date : 18/06/2001
;; last change : 04/07/2001
(define (clear-area window x y width height exposures?)
2001-07-04 10:19:38 -04:00
(%clear-area (window-Xwindow window)
(display-Xdisplay (window-display window))
x y width height exposures?))
(import-lambda-definition %clear-area (Xwindow Xdisplay x y width height
exposures?)
2001-08-21 10:57:08 -04:00
"scx_Clear_Area")
2001-07-04 10:19:38 -04:00
;; _____
(define (copy-area src-drawable gcontext src-x src-y width height dst-drawable
dst-x dst-y)
(%copy-area (display-Xdisplay (drawable-display src-drawable))
(drawable-Xobject src-drawable)
(gcontext-Xgcontext gcontext)
src-x src-y width height
(drawable-Xobject dst-drawable)
dst-x dst-y))
(import-lambda-definition %copy-area (Xdisplay srcXdrawable Xgcontext srcx srcy
width height destXdrawable destx desty)
2001-08-21 10:57:08 -04:00
"scx_Copy_Area")
2001-07-04 10:19:38 -04:00
;; _____
(define (copy-plane src-drawable gcontext plane src-x src-y width height
dst-drawable dst-x dst-y)
(%copy-plane (display-Xdisplay (drawable-display src-drawable))
(drawable-Xobject src-drawable)
(gcontext-Xgcontext gcontext)
plane
src-x srx-y width height
(drawable-Xobject dst-drawable)
dst-x dst-y))
(import-lambda-definition %copy-plane (Xdisplay srcXdrawable Xgcontext plane
srcx srcy width height destXdrawable
destx desty)
2001-08-21 10:57:08 -04:00
"scx_Copy_Plane")
2001-07-04 10:19:38 -04:00
;; _____
(define (draw-point drawable gcontext x y)
(%draw-point (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
(gcontext-Xgcontext gcontext)
x y))
(import-lambda-definition %draw-point (Xdisplay Xdrawable Xgcontext x y)
2001-08-29 10:43:49 -04:00
"scx_Draw_Point")
2001-07-04 10:19:38 -04:00
;; _____
(define (draw-points drawable gcontext points relative?)
2001-07-04 10:19:38 -04:00
(%draw-point (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
(gcontext-Xgcontext gcontext)
(list->vector points)
2001-07-04 10:19:38 -04:00
relative?))
(import-lambda-definition %draw-points (Xdisplay Xdrawable Xgcontext vec
relative)
2001-08-21 10:57:08 -04:00
"scx_Draw_Points")
2001-07-04 10:19:38 -04:00
;; _____
(define (draw-line drawable gcontext x1 y1 x2 y2)
(%draw-line (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
(gcontext-Xgcontext gcontext)
x1 y1 x2 y2))
(import-lambda-definition %draw-line (Xdisplay Xdrawable Xgcontext x1 y1 x2 y2)
2001-08-21 10:57:08 -04:00
"scx_Draw_Line")
2001-07-04 10:19:38 -04:00
;; _____
(define (draw-lines drawable gcontext points relative?)
2001-07-04 10:19:38 -04:00
(%draw-lines (display-Xdisplay (drawable-display drawable))
2001-08-29 10:43:49 -04:00
(drawable-Xobject drawable)
2001-07-04 10:19:38 -04:00
(gcontext-Xgcontext gcontext)
(list->vector points)
2001-07-04 10:19:38 -04:00
relative?))
(import-lambda-definition %draw-lines (Xdisplay Xdrawable Xgcontext vec rel)
2001-08-21 10:57:08 -04:00
"scx_Draw_Lines")
2001-07-04 10:19:38 -04:00
;; _____
;; Note: points is a list which contains lists with 4
2001-07-04 10:19:38 -04:00
;; integers in Form: (x1, y1, x2, y2)
2001-08-29 10:43:49 -04:00
(define (draw-segments drawable gcontext points)
(%draw-segments (display-Xdisplay (drawable-display drawable))
2001-07-04 10:19:38 -04:00
(drawable-Xobject drawable)
(gcontext-Xgcontext gcontext)
(list->vector points)))
2001-07-04 10:19:38 -04:00
(import-lambda-definition %draw-segments (Xdisplay Xdrawable Xgcontext vec)
2001-08-29 10:43:49 -04:00
"scx_Draw_Segments")
2001-07-04 10:19:38 -04:00
(define (draw-rectangle drawable gcontext x y width height)
(%draw-rectangle (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
(gcontext-Xgcontext gcontext)
x y width height))
(import-lambda-definition %draw-rectangle (Xdisplay Xdrawable Xgcontext x y
w h)
2001-08-21 10:57:08 -04:00
"scx_Draw_Rectangle")
2001-07-04 10:19:38 -04:00
(define (fill-rectangle drawable gcontext x y width height)
(%fill-rectangle (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
(gcontext-Xgcontext gcontext)
x y width height))
(import-lambda-definition %fill-rectangle (Xdisplay Xdrawable Xgcontext x y
w h)
2001-08-21 10:57:08 -04:00
"scx_Fill_Rectangle")
2001-07-04 10:19:38 -04:00
(define (draw-rectangles drawable gcontext rectangles)
2001-07-04 10:19:38 -04:00
(%draw-rectangles (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
2001-07-04 10:19:38 -04:00
(gcontext-Xgcontext gcontext)
(list->vector rectangles)))
2001-07-04 10:19:38 -04:00
(import-lambda-definition %draw-rectangles (Xdisplay Xdrawable Xgcontext
vec)
2001-08-21 10:57:08 -04:00
"scx_Draw_Rectangles")
2001-07-04 10:19:38 -04:00
(define (fill-rectangles drawable gcontext rectangles)
2001-07-04 10:19:38 -04:00
(%fill-rectangles (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
2001-07-04 10:19:38 -04:00
(gcontext-Xgcontext gcontext)
(list->vector rectangles)))
2001-07-04 10:19:38 -04:00
(import-lambda-definition %fill-rectangles (Xdisplay Xdrawable Xgcontext
vec)
2001-08-21 10:57:08 -04:00
"scx_Fill_Rectangles")
2001-07-04 10:19:38 -04:00
(define (draw-arc drawable gcontext x y width height angle1 angle2)
(%draw-arc (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
2001-07-04 10:19:38 -04:00
(gcontext-Xgcontext gcontext)
x y width height angle1 angle2))
(import-lambda-definition %draw-arc (Xdisplay Xdrawable Xgcontext x y
w h a1 a2)
2001-08-21 10:57:08 -04:00
"scx_Draw_Arc")
2001-07-04 10:19:38 -04:00
(define (fill-arc drawable gcontext x y width height angle1 angle2)
2001-07-04 10:19:38 -04:00
(%fill-arc (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
2001-07-04 10:19:38 -04:00
(gcontext-Xgcontext gcontext)
x y width height angle1 angle2))
(import-lambda-definition %fill-arc (Xdisplay Xdrawable Xgcontext x y
w h a1 a2)
2001-08-21 10:57:08 -04:00
"scx_Fill_Arc")
2001-07-04 10:19:38 -04:00
(define (draw-arcs drawable gcontext data)
2001-07-04 10:19:38 -04:00
(%draw-arcs (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
2001-07-04 10:19:38 -04:00
(gcontext-Xgcontext gcontext)
(list->vector data)))
2001-07-04 10:19:38 -04:00
(import-lambda-definition %draw-arcs (Xdisplay Xdrawable Xgcontext vec)
2001-08-21 10:57:08 -04:00
"scx_Draw_Arcs")
2001-07-04 10:19:38 -04:00
(define (fill-arcs drawable gcontext data)
2001-07-04 10:19:38 -04:00
(%fill-arcs (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
2001-07-04 10:19:38 -04:00
(gcontext-Xgcontext gcontext)
(list->vector data)))
2001-07-04 10:19:38 -04:00
(import-lambda-definition %fill-arcs (Xdisplay Xdrawable Xgcontext vec)
2001-08-21 10:57:08 -04:00
"scx_Fill_Arcs")
2001-07-04 10:19:38 -04:00
(define (fill-polygon drawable gcontext points relative? shape)
2001-07-04 10:19:38 -04:00
(%fill-polygon (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
2001-07-04 10:19:38 -04:00
(gcontext-Xgcontext gcontext)
(list->vector points) relative? shape))
2001-07-04 10:19:38 -04:00
(import-lambda-definition %fill-polygon (Xdisplay Xdrawable Xgcontext
vec relative shape)
2001-08-29 10:43:49 -04:00
"scx_Fill_Polygon")