CRdraw_rect: Draws rectangle.

View source: R/CRdraw_rect.R

CRdraw_rectR Documentation

Draws rectangle.

Description

Draws outline of rectangle defined in rect_list to rendering target. Rect_list must contain elements x, y, w, and h.

Usage

CRdraw_rect(graphics_list, rect_list, status = NULL)

Arguments

graphics_list

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

rect_list

List defining a rectangle, containing elements x, y, w and h.

status

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

Examples

    CRset_render_color(gs, list(r = 0, g = 0, b = 0))
    
    CRrender_clear(gs)
    
    CRset_render_color(gs, list(r = 100, g = 0, b = 0))
    
    rect_list <- list(x = 50, y = 50, w = 100, h = 50)
    
    CRdraw_rect(gs, rect_list)
    
    CRrender_present(gs)

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