Lines Matching refs:h

14 #define YTRANS(draw, img, y) (((img)->h - 1) - (int)(((img)->h - 1) * ((draw)->port_yl + ((((y) - (…
17 #define JTRANS(draw, img, j) ((draw)->coor_yl + (((PetscReal)(j)) / ((img)->h - 1) + (draw)->port_y…
25 int xmax = img->w - 1, ymax = img->h - 1; in PetscDrawSetViewport_Image()
173 int y = YTRANS(draw, img, yr), h = YTRANS(draw, img, yl) + 1 - y; in PetscDrawRectangle_Image() local
175 PetscImageDrawRectangle(img, x, y, w, h, c); in PetscDrawRectangle_Image()
190 int yc = YTRANS(draw, img, y), h = YTRANS(draw, img, y - b / 2) + 0 - yc; in PetscDrawEllipse_Image() local
191 if (PetscAbsReal(a - b) <= 0) w = h = PetscMin(w, h); /* workaround truncation errors */ in PetscDrawEllipse_Image()
192 PetscImageDrawEllipse(img, xc, yc, w, h, c); in PetscDrawEllipse_Image()
221 static PetscErrorCode PetscDrawStringGetSize_Image(PetscDraw draw, PetscReal *w, PetscReal *h) in PetscDrawStringGetSize_Image() argument
230 if (h) *h = th * (draw->coor_yr - draw->coor_yl) / (img->h * (draw->port_yr - draw->port_yl)); in PetscDrawStringGetSize_Image()
348 static PetscErrorCode PetscDrawResizeWindow_Image(PetscDraw draw, int w, int h) in PetscDrawResizeWindow_Image() argument
353 if (w == img->w && h == img->h) PetscFunctionReturn(PETSC_SUCCESS); in PetscDrawResizeWindow_Image()
357 img->h = h; in PetscDrawResizeWindow_Image()
358 PetscCall(PetscCalloc1((size_t)(img->w * img->h), &img->buffer)); in PetscDrawResizeWindow_Image()
430 PetscCall(PetscDrawCreate(PETSC_COMM_SELF, NULL, NULL, 0, 0, draw->w, draw->h, sdraw)); in PetscDrawGetSingleton_Image()
434 PetscCall(PetscArraycpy(simg->buffer, pimg->buffer, pimg->w * pimg->h)); in PetscDrawGetSingleton_Image()
444 PetscCall(PetscArraycpy(pimg->buffer, simg->buffer, pimg->w * pimg->h)); in PetscDrawRestoreSingleton_Image()
457 …tscDraw draw, unsigned char palette[256][3], unsigned int *w, unsigned int *h, unsigned char *pixe… in PetscDrawGetImage_Image() argument
465 if (h) *h = (unsigned int)img->h; in PetscDrawGetImage_Image()
470 PetscCall(PetscMalloc1((size_t)(img->w * img->h), &buffer)); in PetscDrawGetImage_Image()
475 PetscCall(PetscArraycpy(buffer, img->buffer, img->w * img->h)); in PetscDrawGetImage_Image()
477 …PetscCallMPI(MPI_Reduce(img->buffer, buffer, img->w * img->h, MPI_UNSIGNED_CHAR, MPI_MAX, 0, Petsc… in PetscDrawGetImage_Image()
535 int w = draw->w, h = draw->h; in PetscDrawCreate_Image() local
552 size[1] = h; in PetscDrawCreate_Image()
559 PetscCall(PetscCIntCast(size[1], &h)); in PetscDrawCreate_Image()
561 draw->h = h; in PetscDrawCreate_Image()
569 img->h = h; in PetscDrawCreate_Image()
570 PetscCall(PetscCalloc1((size_t)(img->w * img->h), &img->buffer)); in PetscDrawCreate_Image()
571 PetscImageSetClip(img, 0, 0, img->w, img->h); in PetscDrawCreate_Image()
612 PetscErrorCode PetscDrawOpenImage(MPI_Comm comm, const char filename[], int w, int h, PetscDraw *dr… in PetscDrawOpenImage() argument
615 PetscCall(PetscDrawCreate(comm, NULL, NULL, 0, 0, w, h, draw)); in PetscDrawOpenImage()