/** * Adds a round rectangle to the current path. * * @param x x-coordinate of the starting point * @param y y-coordinate of the starting point * @param w width * @param h height * @param r radius of the arc corner */ public void roundRectangle(float x, float y, float w, float h, float r) { roundRectangle((double) x, (double) y, (double) w, (double) h, (double) r); }
/** * Adds a round rectangle to the current path. * * @param x x-coordinate of the starting point * @param y y-coordinate of the starting point * @param w width * @param h height * @param r radius of the arc corner */ public void roundRectangle(float x, float y, float w, float h, float r) { roundRectangle((double) x, (double) y, (double) w, (double) h, (double) r); }
public void tableLayout(PdfPTable table, float[][] width, float[] height, int headerRows, int rowStart, PdfContentByte[] canvas) { // because table is only one cell length, one can focus on using the first width float xmin = width[0][0]; float xmax = width[0][1]; float ymin = height[height.length - 1]; float ymax = height[0]; float d = 3; PdfContentByte background = canvas[PdfPTable.BASECANVAS]; background.saveState(); background.setColorFill(backgroundColor); background.roundRectangle( xmin - d, ymin - d, (xmax + d) - (xmin - d), (ymax + d) - (ymin - d), d + d); background.fill(); background.restoreState(); }
float t = state.transformY(in.readShort()); float l = state.transformX(in.readShort()); cb.roundRectangle(l, b, r - l, t - b, (h + w) / 4); strokeAndFill(); break;
float t = state.transformY(in.readShort()); float l = state.transformX(in.readShort()); cb.roundRectangle(l, b, r - l, t - b, (h + w) / 4); strokeAndFill(); break;