Next: Miscellaneous Utilities, Previous: Audio, Up: The (sdl *) Modules [Contents][Index]
On surface, draw a point at location x,y with color color.
On surface, draw a horizontal line segment from x1,y to x2,y, with color color.
On surface, draw a vertical line segment from x,y1 to x,y2, with color color.
On surface, draw a rectangle with opposite points x1,y1 and x2,y2, with color color. Optional arg fill means to fill the rectangle as well.
On surface, draw a rectangle with opposite points x1,y1 and x2,y2, with rounded corners radius rad in color color. Optional arg fill means to fill the rectangle as well.
On surface, draw a line segment from x1,y1 to x2,y2, with color color.
On surface, draw an anti-aliased line segment from x1,y1 to x2,y2, with color color.
On surface, draw a line segment from x1,y1 to x2,y2, with thickness width in color color.
On surface, draw arc with center x,y and radius r, going from start to end (degrees), with color color.
If start is greater than end, the effective range of the arc is taken to be end to start (that is, these arguments are internally reversed).
On surface, draw a circle with center x,y and radius r, with color color. Optional arg fill means to fill the circle as well.
On surface, draw an anti-aliased circle with center x,y and radius r, with color color.
On surface, draw an ellipse with center x,y x-radius rx, y-radius ry, with color color. Optional arg fill means to fill the ellipse as well.
On surface, draw an anti-aliased ellipse with center x,y, x-radius rx, y-radius ry, with color color.
On surface, draw a pie slice with center x,y and radius rad, going from start to end (degrees), with color color. Optional arg fill means to fill the slice as well.
On surface, draw a triangle with vertices at x1,y1, x2,y2 and x3,y3, with color color. Optional arg fill means to fill the triangle as well.
On surface, draw an anti-aliased triangle with vertices at x1,y1, x2,y2 and x3,y3, with color color.
On surface, draw a polygon whose points are specified by corresponding pairs from the s16 uniform vectors vx and vy, in color color. Optional arg fill means to fill the polygon as well.
On surface, draw an anti-aliased polygon whose points are specified by corresponding pairs from the s16 uniform vectors vx and vy, in color color.
On surface, draw a polygon whose points are specified by corresponding pairs from the s16 uniform vectors vx and vy, filling from texture (a surface) with offset tdx, tdy.
On surface, draw a bezier curve whose points are specified by corresponding pairs from the s16 uniform vectors vx and vy, with s steps in color color.
On surface at position x,y, draw char c with color (a number).
On surface at position x,y, draw string text with color (a number).
Set the rotation for glyphs drawn by draw-character
and
draw-string
to rotation (an integer or symbol), one of:
0 none 1 clockwise 2 upside-down 3 counter-clockwise
For roto-zoom-surface
and roto-zoom-surface-xy
,
a positive angle means counter-clockwise rotation.
Return a new surface made from rotating surface by angle degrees. Optional third arg zoom (default value 1.0) changes the size as well. Optional fourth arg smooth turns on anti-aliasing.
Return a new surface made from rotating surface by angle degrees. Optional third and fourth args zoomx and zoomy (default value 1.0 for both) changes the size as well. Optional fifth arg smooth turns on anti-aliasing.
Return a new scaled copy of surface. zoomx and zoomy specify the scaling factor. If omitted, zoomy defaults to zoomx. Optional fourth arg smooth turns on anti-aliasing.
Return a new shrunken copy of surface. factorx and factory are positive integers specifying the inverse scaling factor. For example, 2 means half size, 3 means one-third size, etc.
The returned surface is antialiased by “averaging the source box RGBA or Y information” and is in 32-bit RGBA format.
The external representation of an FPS Manager object is:
#<FPS-manager rHz>
where r is the decimal framerate that the object manages.
Return a FPS manager object to be passed as the first
arg to fps-manager-set!
, fps-manager-get
and
fps-manager-delay!
.
Optional arg n specifies the value in Hz to
initialize the object (default 30 if not specified).
Arrange for FPS manager mgr to try to maintain a
frame rate of n Hz. Return #f
if not successful.
Return the frame rate of FPS manager mgr in Hz,
or #f
if unsuccessful.
Return the frame count of FPS manager mgr,
or #f
if unsuccessful.
A frame is counted each time fps-manager-delay!
is called.
Request an appropriate delay from FPS manager mgr. For some versions of SDL_gfx (not the embedded one, currently), return the number of milliseconds elapsed since the last call. This value may be 0 (zero).
If surface is 32-bit, set each pixel’s alpha value to
alpha, an integer 0-255, inclusive, and return #t
.
Otherwise, do nothing and return #f
.
Multiply the alpha channel of 32-bit surface by factor,
an integer 0-255, inclusive. The result is scaled back; the effective
factor is factor/256. Return #t
if alpha was changed.
Blit from 32-bit surface src rectangle srect
to 32-bit surface dst rectangle drect.
Return #f
if there were problems (use get-error
for more info); 1 if a blit was performed; 0 otherwise.
Both srect and drect may be #f
to
indicate the entire surface as source or destination.
The image filtering procedures take one or more surfaces — the
“source(s)”, identified by s, s1, s2 — and
perform an operation on them, writing the result to the
“destination” (d) surface.
The sources and destination must all have the same
width, height and pixel format.
(This pixel format requirement may be relaxed in the future.)
The procedures return #t
on success, else #f
.
With the exception of four procedures: imfi-add-c
,
imfi-sub-c
, imfi-lshr
, and imfi-lshl
,
all bytes in a pixel are subject to the same operation.
For imfi-add-c
and imfi-sub-c
,
if the c (constant) argument value is
more than 255 (does not fit in 8 bits), the constant is interpreted as
a field of four channels and the operation occurs on a per-channel
basis; otherwise (constant fits in 8 bits), a byte-wise operation is
performed as usual.
For imfi-lshr
, and imfi-lshl
, the operation is done
pixel-wise (on a logical pixel, assumed bit-depth 32). This is
indicated by the ‘(uint)’ cast in their descriptions.
If setting is #t
, enable MMX instructions
for the image filter procs (if possible); if #f
, disable;
otherwise do nothing. Return the (boolean) value of the setting
afterwards.
D = saturation255 (S1 + S2).
D = S1/2 + S2/2.
D = saturation0 (S1 - S2).
D = | S1 - S2 |.
D = saturation (S1 * S2).
D = S1 * S2 (non-MMX).
D = saturation255 (S1/2 * S2).
D = saturation255 (S1/2 * S2/2).
D = S1 & S2.
D = S1 | S2.
D = S1 / S2 (non-MMX).
D = !S.
D = saturation255 (S + C).
D = saturation255 (S/2 + C).
D = saturation0 (S - C).
D = saturation0 (S >> N).
D = saturation0 ((uint) S >> N).
D = saturation255 (S * C).
D = saturation255 ((S >> N) * C).
D = (S << N).
D = ((uint) S << N).
D = saturation255 (S << N).
D = (S < T ? 0 : 255).
D = (Tmin <= S <= Tmax) ? 255 : 0.
D = saturation255 ((Nmax - Nmin) / (Cmax - Cmin) * (S - Cmin) + Nmin).
Next: Miscellaneous Utilities, Previous: Audio, Up: The (sdl *) Modules [Contents][Index]