PetscDrawRectangle — PETSc 3.25.1 documentation

Skip to main content
`Ctrl`+`K`

# PetscDrawRectangle

draws a rectangle onto a `PetscDraw` object

## Synopsis

    #include "petscdraw.h"
    PetscErrorCode PetscDrawRectangle(PetscDraw draw, PetscReal xl, PetscReal yl, PetscReal xr, PetscReal yr, int c1, int c2, int c3, int c4)

Not Collective

## Input Parameters

- draw - the drawing context

- xl - coordinates of the lower left corner

- yl - coordinates of the lower left corner

- xr - coordinate of the upper right corner

- yr - coordinate of the upper right corner

- c1 - the color of the first corner

- c2 - the color of the second corner

- c3 - the color of the third corner

- c4 - the color of the fourth corner

## See Also

`PetscDraw`, `PetscDrawLine()`, `PetscDrawTriangle()`, `PetscDrawEllipse()`, `PetscDrawMarker()`, `PetscDrawPoint()`, `PetscDrawString()`, `PetscDrawArrow()`

## Level

beginner

## Location

src/sys/classes/draw/interface/drect.c

## Implementations

PetscDrawRectangle_Image() in src/sys/classes/draw/impls/image/drawimage.c
PetscDrawRectangle_Null() in src/sys/classes/draw/impls/null/drawnull.c
PetscDrawRectangle_TikZ() in src/sys/classes/draw/impls/tikz/tikz.c
PetscDrawRectangle_Win32() in src/sys/classes/draw/impls/win32/win32draw.c
PetscDrawRectangle_X() in src/sys/classes/draw/impls/x/xops.c

Index of all Draw routines
Table of Contents for all manual pages
Index of all manual pages