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 - draws 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: `PetscDraw`, `PetscDrawPointPixel()`, `PetscDrawPointSetSize()`, `PetscDrawLine()`, `PetscDrawRectangle()`, `PetscDrawTriangle()`, `PetscDrawEllipse()`,
 20:           `PetscDrawMarker()`, `PetscDrawString()`, `PetscDrawArrow()`
 21: @*/
 22: PetscErrorCode PetscDrawPoint(PetscDraw draw, PetscReal xl, PetscReal yl, int cl)
 23: {
 25:   PetscUseTypeMethod(draw, point, xl, yl, cl);
 26:   return 0;
 27: }

 29: /*@
 30:    PetscDrawPointPixel - draws a point onto a drawable, in pixel coordinates

 32:    Not collective

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

 39:    Level: beginner

 41: .seealso: `PetscDraw`, `PetscDrawPoint()`, `PetscDrawPointSetSize()`
 42: @*/
 43: PetscErrorCode PetscDrawPointPixel(PetscDraw draw, int x, int y, int c)
 44: {
 46:   PetscUseTypeMethod(draw, pointpixel, x, y, c);
 47:   return 0;
 48: }

 50: /*@
 51:    PetscDrawPointSetSize - Sets the point size for future draws.  The size is
 52:    relative to the user coordinates of the window; 0.0 denotes the natural
 53:    width, 1.0 denotes the entire viewport.

 55:    Not collective

 57:    Input Parameters:
 58: +  draw - the drawing context
 59: -  width - the width in user coordinates

 61:    Level: advanced

 63:    Note:
 64:    Even a size of zero insures that a single pixel is colored.

 66: .seealso: `PetscDraw`, `PetscDrawPoint()`, `PetscDrawMarker()`
 67: @*/
 68: PetscErrorCode PetscDrawPointSetSize(PetscDraw draw, PetscReal width)
 69: {
 72:   PetscTryTypeMethod(draw, pointsetsize, width);
 73:   return 0;
 74: }