Actual source code: dtext.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: /*@C
     10:    PetscDrawString - PetscDraws text onto a drawable.

     12:    Not Collective

     14:    Input Parameters:
     15: +  draw - the drawing context
     16: .  xl - the coordinates of lower left corner of text
     17: .  yl - the coordinates of lower left corner of text
     18: .  cl - the color of the text
     19: -  text - the text to draw

     21:    Level: beginner

     23:    Concepts: drawing^string
     24:    Concepts: string^drawing

     26: .seealso: PetscDrawStringVertical()

     28: @*/
     29: PetscErrorCode PETSC_DLLEXPORT PetscDrawString(PetscDraw draw,PetscReal xl,PetscReal yl,int cl,const char text[])
     30: {
     31:   PetscErrorCode ierr ;
     32:   PetscTruth isnull;

     37:   PetscTypeCompare((PetscObject)draw,PETSC_DRAW_NULL,&isnull);
     38:   if (isnull) return(0);
     39:   (*draw->ops->string)(draw,xl,yl,cl,text);
     40:   return(0);
     41: }