Next: Blend Modes, Previous: Surfaces, Up: API Reference [Contents][Index]
(use-modules (sdl2 render))
Return a new renderer for window created with the options specified in flags, a list of symbols. The valid symbols that may appear in flags are:
Return #t
if r is a renderer.
Delete the rendering context renderer.
Call proc, passing it renderer and closing renderer upon exit of proc.
Clear the rendering target renderer with the current drawing color.
Display renderer.
Returns #t
if renderer currently uses integer scaling and
#f
otherwise. Integer scaling can be used together with
logical size to effectively restrict the drawing region to an area
even if the window is larger than that.
If enable? is #t
, enable integer scaling, otherwise
disable it.
Return the current logical size used by renderer.
Set the logical size of renderer to width x height.
Return the scaling factors (X Y)
used by renderer to
scale coordinates.
Set the factors by which renderer scales coordinates according to the scaling factors scale-x and scale-y.
Return the rectangle that renderer currently draws on. If the entire region is used, all values of that rectangle will be 0.
Set the drawing area for renderer to rect.
Copy texture to the rendering target of renderer.
Set color of renderer to the 32-bit color defined by the 8-bit color channels r, g, b, a. Each color channel value is in the range [0, 255].
Set blend mode of renderer to blend-mode. See Blend Modes for more information.
Sets the render target for renderer to texture, making all comming draw requests redirect to texture.
Pass #f
to reset it to the default target.
Returns the current render target of renderer or #f
if
it’s a texture.
Draw a line from (x1, y1) to (x2, y2) on the current rendering target of renderer.
Draw a series of connected lines from points on the current rendering target of renderer. Optionally, for best performance, points may instead be a bytevector packed with signed 32 bit integers, 2 per point (x and y).
Draw a point at (x, y) on the current rendering target of renderer.
Draw a multiple points from points on the current rendering target of renderer. Optionally, for best performance, points may instead be a bytevector packed with signed 32 bit integers, 2 per point (x and y).
Draw the outline of rectangle onto renderer.
Draw the outline of all rects in the list rects onto renderer. Optionally, for best performance, rects may instead be a bytevector packed with signed 32 bit integers, 4 per rect (x, y, width, height).
Fill rectangle onto renderer.
Fill the list rects onto renderer. Optionally, for best performance, rects may instead be a bytevector packed with signed 32 bit integers, 4 per rect (x, y, width, height).
Returns a new texture for renderer with pixel format. access is one of the symbols:
texture
flag.
Return 4 values for the format, access, width and height of a texture.
Convert surface to a texture suitable for renderer.
Free the memory used by texture.
Update the subsection of texture defined by rect with new pixel data in the pixels bytevector. pitch represents the number of bytes in a row of pixel data, including any padding between rows. This is a fairly slow process: Better to use the lock/unlock mechanism in streaming textures.
Get color mod of texture as a list of the integers.
Get alpha mod of texture as a single integer.
Set the color mod of texture.
Set the alpha mod of texture.
Set the blend of texture to blend-mode. See Blend Modes for more information.
Next: Blend Modes, Previous: Surfaces, Up: API Reference [Contents][Index]