Actual source code: dpoint.c

      2: /*
      3:        Provides the calling sequences for all the basic PetscDraw routines.
      4: */
      5: #include <petsc/private/drawimpl.h>

      7: /*@
      8:    PetscDrawPoint - PetscDraws a point onto a drawable.

     10:    Not collective

     12:    Input Parameters:
     13: +  draw - the drawing context
     14: .  xl,yl - the coordinates of the point
     15: -  cl - the color of the point

     17:    Level: beginner

     19: .seealso: PetscDrawPointPixel(), PetscDrawPointSetSize(), PetscDrawLine(), PetscDrawRectangle(), PetscDrawTriangle(), PetscDrawEllipse(),
     20:           PetscDrawMarker(), PetscDrawString(), PetscDrawArrow()

     22: @*/
     23: PetscErrorCode  PetscDrawPoint(PetscDraw draw,PetscReal xl,PetscReal yl,int cl)
     24: {
     27:   (*draw->ops->point)(draw,xl,yl,cl);
     28:   return 0;
     29: }

     31: /*@
     32:    PetscDrawPointPixel - PetscDraws a point onto a drawable, in pixel coordinates

     34:    Not collective

     36:    Input Parameters:
     37: +  draw - the drawing context
     38: .  x,y - the pixel coordinates of the point
     39: -  c - the color of the point

     41:    Level: beginner

     43: .seealso: PetscDrawPoint(), PetscDrawPointSetSize()

     45: @*/
     46: PetscErrorCode  PetscDrawPointPixel(PetscDraw draw,int x,int y,int c)
     47: {
     50:   (*draw->ops->pointpixel)(draw,x,y,c);
     51:   return 0;
     52: }

     54: /*@
     55:    PetscDrawPointSetSize - Sets the point size for future draws.  The size is
     56:    relative to the user coordinates of the window; 0.0 denotes the natural
     57:    width, 1.0 denotes the entire viewport.

     59:    Not collective

     61:    Input Parameters:
     62: +  draw - the drawing context
     63: -  width - the width in user coordinates

     65:    Level: advanced

     67:    Note:
     68:    Even a size of zero insures that a single pixel is colored.

     70: .seealso: PetscDrawPoint(), PetscDrawMarker()
     71: @*/
     72: PetscErrorCode  PetscDrawPointSetSize(PetscDraw draw,PetscReal width)
     73: {
     76:   if (draw->ops->pointsetsize) {
     77:     (*draw->ops->pointsetsize)(draw,width);
     78:   }
     79:   return 0;
     80: }