Actual source code: dpoints.c

      1: #define PETSC_DLL
      2: /*
      3:        Provides the calling sequences for all the basic PetscDraw routines.
      4: */
     5:  #include src/sys/src/draw/drawimpl.h

      9: /*@
     10:    PetscDrawPointSetSize - Sets the point size for future draws.  The size is
     11:    relative to the user coordinates of the window; 0.0 denotes the natural
     12:    width, 1.0 denotes the entire viewport.

     14:    Not collective

     16:    Input Parameters:
     17: +  draw - the drawing context
     18: -  width - the width in user coordinates

     20:    Level: advanced

     22:    Note:
     23:    Even a size of zero insures that a single pixel is colored.

     25:    Concepts: point^drawing size

     27: .seealso: PetscDrawPoint()
     28: @*/
     29: PetscErrorCode PETSC_DLLEXPORT PetscDrawPointSetSize(PetscDraw draw,PetscReal width)
     30: {
     32:   PetscTruth isnull;

     36:   PetscTypeCompare((PetscObject)draw,PETSC_DRAW_NULL,&isnull);
     37:   if (isnull) return(0);
     38:   if (width < 0.0 || width > 1.0) SETERRQ1(PETSC_ERR_ARG_OUTOFRANGE,"Bad size %g, should be between 0 and 1",width);
     39:   if (draw->ops->pointsetsize) {
     40:     (*draw->ops->pointsetsize)(draw,width);
     41:   }
     42:   return(0);
     43: }