Actual source code: dtexts.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:    PetscDrawStringSetSize - Sets the size for character text.

     12:    Not Collective

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

     19:    Level: advanced

     21:    Note:
     22:    Only a limited range of sizes are available.

     24:    Concepts: string^drawing size

     26: .seealso: PetscDrawString(), PetscDrawStringVertical(), PetscDrawStringGetSize()

     28: @*/
     29: PetscErrorCode PETSC_DLLEXPORT PetscDrawStringSetSize(PetscDraw draw,PetscReal width,PetscReal height)
     30: {
     32:   PetscTruth isnull;

     36:   PetscTypeCompare((PetscObject)draw,PETSC_DRAW_NULL,&isnull);
     37:   if (isnull) return(0);
     38:   if (draw->ops->stringsetsize) {
     39:     (*draw->ops->stringsetsize)(draw,width,height);
     40:   }
     41:   return(0);
     42: }