scx/scheme/xlib/graphics.scm

213 lines
6.1 KiB
Scheme

;; author -> Norbert Freudemann
;; creation date : 18/06/2001
;; last change : 04/07/2001
(define (clear-area window x y width height exposures?)
(%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?)
"scx_Clear_Area")
;; _____
(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)
"scx_Copy_Area")
;; _____
(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)
"scx_Copy_Plane")
;; _____
(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)
"scx_Draw-Point")
;; _____
(define (draw-points drawable gcontext points relative?)
(%draw-point (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
(gcontext-Xgcontext gcontext)
(list->vector points)
relative?))
(import-lambda-definition %draw-points (Xdisplay Xdrawable Xgcontext vec
relative)
"scx_Draw_Points")
;; _____
(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)
"scx_Draw_Line")
;; _____
(define (draw-lines drawable gcontext points relative?)
(%draw-lines (display-Xdisplay (drawable-display drawable))
(drawalbe-Xobject drawable)
(gcontext-Xgcontext gcontext)
(list->vector points)
relative?))
(import-lambda-definition %draw-lines (Xdisplay Xdrawable Xgcontext vec rel)
"scx_Draw_Lines")
;; _____
;; Note: points is a list which contains lists with 4
;; integers in Form: (x1, y1, x2, y2)
(define (draw-segments drawalbe gcontext points)
(%draw-segments (display-Xdisplay (drawable-display drawalbe))
(drawable-Xobject drawable)
(gcontext-Xgcontext gcontext)
(list->vector points)))
(import-lambda-definition %draw-segments (Xdisplay Xdrawable Xgcontext vec)
"Draw_Segments")
(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)
"scx_Draw_Rectangle")
(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)
"scx_Fill_Rectangle")
(define (draw-rectangles drawable gcontext rectangles)
(%draw-rectangles (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
(gcontext-Xgcontext gcontext)
(list->vector rectangles)))
(import-lambda-definition %draw-rectangles (Xdisplay Xdrawable Xgcontext
vec)
"scx_Draw_Rectangles")
(define (fill-rectangles drawable gcontext rectangles)
(%fill-rectangles (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
(gcontext-Xgcontext gcontext)
(list->vector rectangles)))
(import-lambda-definition %fill-rectangles (Xdisplay Xdrawable Xgcontext
vec)
"scx_Fill_Rectangles")
(define (draw-arc drawable gcontext x y width height angle1 angle2)
(%draw-arc (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
(gcontext-Xgcontext gcontext)
x y width height angle1 angle2))
(import-lambda-definition %draw-arc (Xdisplay Xdrawable Xgcontext x y
w h a1 a2)
"scx_Draw_Arc")
(define (fill-arc drawable gcontext x y width height angle1 angle2)
(%fill-arc (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
(gcontext-Xgcontext gcontext)
x y width height angle1 angle2))
(import-lambda-definition %fill-arc (Xdisplay Xdrawable Xgcontext x y
w h a1 a2)
"scx_Fill_Arc")
(define (draw-arcs drawable gcontext data)
(%draw-arcs (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
(gcontext-Xgcontext gcontext)
(list->vector data)))
(import-lambda-definition %draw-arcs (Xdisplay Xdrawable Xgcontext vec)
"scx_Draw_Arcs")
(define (fill-arcs drawable gcontext data)
(%fill-arcs (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
(gcontext-Xgcontext gcontext)
(list->vector data)))
(import-lambda-definition %fill-arcs (Xdisplay Xdrawable Xgcontext vec)
"scx_Fill_Arcs")
(define (fill-polygon drawable gcontext points relative? shape)
(%fill-polygon (display-Xdisplay (drawable-display drawable))
(drawable-Xobject drawable)
(gcontext-Xgcontext gcontext)
(list->vector points) relative? shape))
(import-lambda-definition %fill-polygon (Xdisplay Xdrawable Xgcontext
vec relative shape)
"scx_Fill-Polygon")