:orphan:
# PetscDrawCoordinateToPixel
given a coordinate in a `PetscDraw` returns the pixel location 
## Synopsis
```
#include "petscdraw.h" 
PetscErrorCode PetscDrawCoordinateToPixel(PetscDraw draw, PetscReal x, PetscReal y, int *i, int *j)
```
Not Collective


## Input Parameters

- ***draw -*** the draw where the coordinates are defined
- ***x -*** the horizontal coordinate
- ***y -*** the vertical coordinate



## Output Parameters

- ***i -*** the horizontal pixel location
- ***j -*** the vertical pixel location





## See Also
 `PetscDraw`

## Level
developer

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

## Implementations

<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/draw/impls/image/drawimage.c.html#PetscDrawCoordinateToPixel_Image">PetscDrawCoordinateToPixel_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#PetscDrawCoordinateToPixel_Null">PetscDrawCoordinateToPixel_Null in src/sys/classes/draw/impls/null/drawnull.c</A><BR>
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/classes/draw/impls/x/xops.c.html#PetscDrawCoordinateToPixel_X">PetscDrawCoordinateToPixel_X in src/sys/classes/draw/impls/x/xops.c</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/classes/draw/interface/drect.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)  
