Actual source code: dtext.c

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

  8: /*@C
  9:    PetscDrawString - PetscDraws text onto a drawable.

 11:    Not Collective

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

 20:    Level: beginner

 22:    Concepts: drawing^string
 23:    Concepts: string^drawing

 25: .seealso: PetscDrawStringVertical()

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

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