Actual source code: dpoints.c

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

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

 13:    Not collective

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

 19:    Level: advanced

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

 24:    Concepts: point^drawing size

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

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