Lines Matching refs:w
13 #define XTRANS(draw, img, x) ((int)(((img)->w - 1) * ((draw)->port_xl + ((((x) - (draw)->coor_xl) *…
16 …coor_xl + (((PetscReal)(i)) * ((draw)->coor_xr - (draw)->coor_xl) / ((img)->w - 1) - (draw)->port_…
25 int xmax = img->w - 1, ymax = img->h - 1; in PetscDrawSetViewport_Image()
111 *width = lw * (draw->coor_xr - draw->coor_xl) / (img->w * (draw->port_xr - draw->port_xl)); in PetscDrawLineGetWidth_Image()
172 int x = XTRANS(draw, img, xl), w = XTRANS(draw, img, xr) + 1 - x; in PetscDrawRectangle_Image() local
175 PetscImageDrawRectangle(img, x, y, w, h, c); in PetscDrawRectangle_Image()
189 int xc = XTRANS(draw, img, x), w = XTRANS(draw, img, x + a / 2) + 0 - xc; 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
229 if (w) *w = tw * (draw->coor_xr - draw->coor_xl) / (img->w * (draw->port_xr - draw->port_xl)); 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()
356 img->w = w; 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 …GetImage_Image(PetscDraw draw, unsigned char palette[256][3], unsigned int *w, unsigned int *h, un… in PetscDrawGetImage_Image() argument
464 if (w) *w = (unsigned int)img->w; 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
550 size[0] = w; in PetscDrawCreate_Image()
558 PetscCall(PetscCIntCast(size[0], &w)); in PetscDrawCreate_Image()
560 draw->w = w; in PetscDrawCreate_Image()
568 img->w = w; 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()