CRdraw_image: Draws image.

View source: R/CRdraw_image.R

CRdraw_imageR Documentation

Draws image.

Description

Draws an image in image_list to rendering target. Argument index specifies which image in image_list to draw.

Usage

CRdraw_image(graphics_list, image_list, index, rect_list, status = NULL)

Arguments

graphics_list

List containing pointers to window, renderer etc. created with CRopen.

image_list

List containing one or more images previously loaded with CRload_image.

item

Index of image in image_list to be drawn.

rect_list

List defining rectangle in window to draw image to, must contain elements x, y, w, h.

status

Optional list status with elements value and message to retrieve warnings and error messages.

Details

Images are first loaded using CRload_image, which creates an image_list. Images are off-screen resources that can be copied to the screen using CRdraw_image. Images are different internally from textures: the latter are more flexible, for example when copying them to screen, and are also more efficient than images, which are slow to copy. If showing an image via CRdraw_image is too slow, the image can first be drawn to a texture (see CRcreate_texture), which is faster and more flexible to copy.


lorweiuk/CREx documentation built on March 16, 2024, 3:04 a.m.