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

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

      2: static char help[] = "Demonstrates use of color map\n";

      4: #include <petscsys.h>
      5: #include <petscdraw.h>

      9: int main(int argc,char **argv)
     10: {
     11:   PetscDraw      draw;

     14:   PetscInitialize(&argc,&argv,(char*)0,help);

     16:   PetscDrawCreate(PETSC_COMM_SELF,0,"Title",0,0,256,256,&draw);
     17:   PetscDrawSetFromOptions(draw);

     19:   PetscDrawBoxedString(draw,.5,.5,PETSC_DRAW_BLUE,PETSC_DRAW_RED,"Greetings",NULL,NULL);

     21:   PetscDrawBoxedString(draw,.25,.75,PETSC_DRAW_BLUE,PETSC_DRAW_RED,"How\nare\nyou?",NULL,NULL);
     22:   PetscDrawBoxedString(draw,.25,.25,PETSC_DRAW_GREEN,PETSC_DRAW_RED,"Long line followed by a very\nshort line",NULL,NULL);
     23:   PetscDrawFlush(draw);
     24:   PetscDrawDestroy(&draw);
     25:   PetscFinalize();
     26:   return 0;
     27: }