CRfill_rects: Draws multiple filled rectangles.

View source: R/CRfill_rects.R

CRfill_rectsR Documentation

Draws multiple filled rectangles.

Description

Draws multiple filled rectangles defined in rect_list to rendering target.

Usage

CRfill_rects(graphics_list, rect_list, status = NULL)

Arguments

graphics_list

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

rect_list

List defining multiple rectangles, containing vector elements x, y, w and h. (x[i], y[i], w[i], h[i]) together define one rectangle.

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 = c(50, 200, 100),
                      y = c(50, 50, 150),
                      w = c(50, 50, 150),
                      h = c(50, 70, 50))
    
    CRfill_rects(gs, rect_list)
    
    CRrender_present(gs)

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