Actual source code: dtextgs.c
1: /*$Id: dtextgs.c,v 1.36 2001/04/18 20:48:33 balay Exp $*/
2: /*
3: Provides the calling sequences for all the basic PetscDraw routines.
4: */
5: #include src/sys/src/draw/drawimpl.h
7: #undef __FUNCT__
9: /*@
10: PetscDrawStringGetSize - Gets the size for character text. The width 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
19: - height - the character height
21: Level: advanced
23: Concepts: string^drawing size
25: .seealso: PetscDrawString(), PetscDrawStringVertical(), PetscDrawStringSetSize()
27: @*/
28: int PetscDrawStringGetSize(PetscDraw draw,PetscReal *width,PetscReal *height)
29: {
30: int ierr;
31: PetscTruth isnull;
35: PetscTypeCompare((PetscObject)draw,PETSC_DRAW_NULL,&isnull);
36: if (isnull) return(0);
37: if (!draw->ops->stringgetsize) SETERRQ1(1,"This draw object %s does not support getting string size",draw->type_name);
38: (*draw->ops->stringgetsize)(draw,width,height);
39: return(0);
40: }