Lines Matching refs:h
11 #define YTRANS(draw, xwin, y) (((xwin)->h - 1) - (int)(((xwin)->h - 1) * ((draw)->port_yl + (((y - …
14 #define JTRANS(draw, xwin, j) ((draw)->coor_yl + (((PetscReal)(j)) / ((xwin)->h - 1) + (draw)->port…
19 int xa, ya, xb, yb, xmax = XiWin->w - 1, ymax = XiWin->h - 1; in PetscDrawSetViewport_X()
134 int x, y, w, h, c = (c1 + c2 + c3 + c4) / 4; in PetscDrawRectangle_X() local
142 h = YTRANS(draw, XiWin, yl) + 1 - y; in PetscDrawRectangle_X()
143 if (h <= 0) h = 1; in PetscDrawRectangle_X()
144 XFillRectangle(XiWin->disp, PetscDrawXiDrawable(XiWin), XiWin->gc.set, x, y, w, h); in PetscDrawRectangle_X()
151 int xA, yA, w, h; in PetscDrawEllipse_X() local
159 h = YTRANS(draw, XiWin, y - b / 2) + 1 - yA; in PetscDrawEllipse_X()
160 h = PetscAbs(h); in PetscDrawEllipse_X()
161 XFillArc(XiWin->disp, PetscDrawXiDrawable(XiWin), XiWin->gc.set, xA, yA, w, h, 0, 360 * 64); in PetscDrawEllipse_X()
198 int w, h; in PetscDrawStringSetSize_X() local
202 h = (int)(XiWin->h * y * (draw->port_yr - draw->port_yl) / (draw->coor_yr - draw->coor_yl)); in PetscDrawStringSetSize_X()
204 PetscCall(PetscDrawXiFontFixed(XiWin, w, h, &XiWin->font)); in PetscDrawStringSetSize_X()
211 PetscReal w, h; in PetscDrawStringGetSize_X() local
215 h = XiWin->font->font_h; in PetscDrawStringGetSize_X()
217 if (y) *y = h * (draw->coor_yr - draw->coor_yl) / (XiWin->h * (draw->port_yr - draw->port_yl)); in PetscDrawStringGetSize_X()
279 …= 0) XCopyArea(XiWin->disp, XiWin->drw, XiWin->win, XiWin->gc.set, 0, 0, XiWin->w, XiWin->h, 0, 0); in PetscDrawFlush_X()
290 int xmax = XiWin->w - 1, ymax = XiWin->h - 1; in PetscDrawClear_X()
309 unsigned int h = (unsigned int)(yb + 1 - ya); in PetscDrawClear_X() local
311 XFillRectangle(XiWin->disp, PetscDrawXiDrawable(XiWin), XiWin->gc.set, xa, ya, w, h); in PetscDrawClear_X()
347 …scObjectComm((PetscObject)draw), draw->display, NULL, win->x, win->y + win->h + 10, 220, 220, popu… in PetscDrawGetPopup_X()
396 if (xywh[2] == win->w && xywh[3] == win->h) PetscFunctionReturn(PETSC_SUCCESS); in PetscDrawCheckResizedWindow_X()
399 draw->h = win->h = xywh[3]; in PetscDrawCheckResizedWindow_X()
411 static PetscErrorCode PetscDrawResizeWindow_X(PetscDraw draw, int w, int h) in PetscDrawResizeWindow_X() argument
417 if (w == win->w && h == win->h) PetscFunctionReturn(PETSC_SUCCESS); in PetscDrawResizeWindow_X()
422 if (rank == 0) PetscCall(PetscDrawXiResizeWindow(win, w, h)); in PetscDrawResizeWindow_X()
427 draw->h = win->h = h; in PetscDrawResizeWindow_X()
448 unsigned int w, h, border, depth; in PetscDrawGetMouseButton_X() local
472 XGetGeometry(win->disp, win->win, &root, &root_x, &root_y, &w, &h, &border, &depth); in PetscDrawGetMouseButton_X()
510 yy = 1 - ((PetscReal)py) / h; in PetscDrawGetMouseButton_X()
581 …rawCreate(PETSC_COMM_SELF, draw->display, draw->title, draw->x, draw->y, draw->w, draw->h, sdraw)); in PetscDrawGetSingleton_X()
607 PetscCall(PetscDrawXiGetGeometry(sXwin, &sXwin->x, &sXwin->y, &sXwin->w, &sXwin->h)); in PetscDrawGetSingleton_X()
611 (*sdraw)->h = sXwin->h; in PetscDrawGetSingleton_X()
678 int x = draw->x, y = draw->y, w = draw->w, h = draw->h; in PetscDrawCreate_X() local
712 if (sizes[1] > 1.0) h = (int)sizes[1]; in PetscDrawCreate_X()
713 else if (sizes[1] == 1.0) h = PETSC_DRAW_FULL_SIZE; in PetscDrawCreate_X()
714 else if (sizes[1] == .5) h = PETSC_DRAW_HALF_SIZE; in PetscDrawCreate_X()
715 …else if (PetscEqualReal(sizes[1], .3)) h = PETSC_DRAW_THIRD_SIZE; /* sizes == 0.3 will never be tr… in PetscDrawCreate_X()
716 else if (sizes[1] == .25) h = PETSC_DRAW_QUARTER_SIZE; in PetscDrawCreate_X()
719 if (h == PETSC_DECIDE || h == PETSC_DEFAULT) h = draw->h = 300; in PetscDrawCreate_X()
734 switch (h) { in PetscDrawCreate_X()
736 h = draw->h = (ymax - 10); in PetscDrawCreate_X()
739 h = draw->h = (ymax - 20) / 2; in PetscDrawCreate_X()
742 h = draw->h = (ymax - 30) / 3; in PetscDrawCreate_X()
745 h = draw->h = (ymax - 40) / 4; in PetscDrawCreate_X()
756 xywh[3] = h; in PetscDrawCreate_X()
761 PetscCall(PetscCIntCast(xywh[3], &h)); in PetscDrawCreate_X()
763 if (h == PETSC_DECIDE || h == PETSC_DEFAULT) h = 300; in PetscDrawCreate_X()
767 draw->h = h; in PetscDrawCreate_X()
788 ybottom = PetscMax(ybottom, y + h + 30); in PetscDrawCreate_X()
793 ybottom = ybottom + h + 30; in PetscDrawCreate_X()
800 yavailable = yavailable + h + 30; in PetscDrawCreate_X()
812 …PetscCheck(rank != 0 || (w > 0 && h > 0), PETSC_COMM_SELF, PETSC_ERR_ARG_OUTOFRANGE, "Negative win… in PetscDrawCreate_X()
823 Xwin->h = h; in PetscDrawCreate_X()
824 if (rank == 0) PetscCall(PetscDrawXiQuickWindow(Xwin, draw->title, x, y, w, h)); in PetscDrawCreate_X()
831 Xwin->h = h; in PetscDrawCreate_X()
836 PetscCall(PetscDrawXiGetGeometry(Xwin, &Xwin->x, &Xwin->y, &Xwin->w, &Xwin->h)); in PetscDrawCreate_X()
840 draw->h = Xwin->h; in PetscDrawCreate_X()