Actual source code: ex11.c
petsc-3.13.6 2020-09-29
2: static char help[] = "Demonstrates use of color map\n";
4: #include <petscsys.h>
5: #include <petscdraw.h>
7: int main(int argc,char **argv)
8: {
9: PetscDraw draw;
12: PetscInitialize(&argc,&argv,NULL,help);if (ierr) return ierr;
14: PetscDrawCreate(PETSC_COMM_SELF,0,"Title",0,0,256,256,&draw);
15: PetscDrawSetFromOptions(draw);
17: PetscDrawStringBoxed(draw,.5,.5,PETSC_DRAW_BLUE,PETSC_DRAW_RED,"Greetings",NULL,NULL);
19: PetscDrawStringBoxed(draw,.25,.75,PETSC_DRAW_BLUE,PETSC_DRAW_RED,"How\nare\nyou?",NULL,NULL);
20: PetscDrawStringBoxed(draw,.25,.25,PETSC_DRAW_GREEN,PETSC_DRAW_RED,"Long line followed by a very\nshort line",NULL,NULL);
21: PetscDrawFlush(draw);
22: PetscDrawDestroy(&draw);
23: PetscFinalize();
24: return ierr;
25: }
29: /*TEST
31: build:
32: requires: x
34: test:
35: output_file: output/ex1_1.out
37: TEST*/