:orphan:
# PetscDrawStringBoxed
Draws a string with a box around it 
## Synopsis
```
#include "petscdraw.h" 
PetscErrorCode PetscDrawStringBoxed(PetscDraw draw, PetscReal sxl, PetscReal syl, int sc, int bc, const char text[], PetscReal *w, PetscReal *h)
```
Not Collective


## Input Parameters

- ***draw -*** the drawing context
- ***sxl -*** the coordinates of center of the box
- ***syl -*** the coordinates of top line of box
- ***sc -*** the color of the text
- ***bc -*** the color of the bounding box
- ***text -*** the text to draw



## Output Parameter

- ***w,h -*** width and height of resulting box (optional)





## See Also
 `PetscDraw`, `PetscDrawStringVertical()`, `PetscDrawString()`, `PetscDrawStringCentered()`, `PetscDrawStringSetSize()`,
`PetscDrawStringGetSize()`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/draw/interface/dtext.c.html#PetscDrawStringBoxed">src/sys/classes/draw/interface/dtext.c</A>

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/draw/impls/image/drawimage.c.html#PetscDrawStringBoxed_Image">PetscDrawStringBoxed_Image in src/sys/classes/draw/impls/image/drawimage.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/draw/impls/null/drawnull.c.html#PetscDrawStringBoxed_Null">PetscDrawStringBoxed_Null in src/sys/classes/draw/impls/null/drawnull.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/draw/impls/tikz/tikz.c.html#PetscDrawStringBoxed_TikZ">PetscDrawStringBoxed_TikZ in src/sys/classes/draw/impls/tikz/tikz.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/draw/interface/dtext.c)


[Index of all Draw routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
