Date: 2013-07-02T14:38:17+00:00

Actual source code: dpoints.c
petsc-3.4.2 2013-07-02

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

      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  PetscDrawPointSetSize(PetscDraw draw,PetscReal width)
     30: {
     32:   PetscBool      isnull;

     36:   PetscObjectTypeCompare((PetscObject)draw,PETSC_DRAW_NULL,&isnull);
     37:   if (isnull) return(0);
     38:   if (width < 0.0 || width > 1.0) SETERRQ1(PETSC_COMM_SELF,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: }