Skip to main content
`Ctrl`+`K`

# PetscViewerDrawGetDraw

Returns `PetscDraw` object from `PETSCVIEWERDRAW` `PetscViewer` object. This `PetscDraw` object may then be used to perform graphics using `PetscDraw` commands.

## Synopsis

    #include "petscdraw.h"
    #include "petscviewer.h"
    PetscErrorCode PetscViewerDrawGetDraw(PetscViewer viewer, PetscInt windownumber, PetscDraw *draw)

Collective

## Input Parameters

- viewer - the `PetscViewer` (created with `PetscViewerDrawOpen()` of type `PETSCVIEWERDRAW`)

- windownumber - indicates which subwindow (usually 0) to obtain

## Output Parameter

- draw - the draw object

## See Also

Viewers: Looking at PETSc Objects, `PETSCVIEWERDRAW`, `PetscViewerDrawGetLG()`, `PetscViewerDrawGetAxis()`, `PetscViewerDrawOpen()`

## Level

intermediate

## Location

src/sys/classes/viewer/impls/draw/draw/fdrawv.c

## Examples

src/ts/tutorials/ex6.c
src/ts/tutorials/ex2.c
src/ts/tutorials/ex4.c
src/ts/tutorials/ex3.c
src/ts/tutorials/ex21.c
src/ts/tutorials/ex5.c

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