Lines 219-224
Link Here
|
219 |
addRect(x, y, w, h, pdfcol, pdfcol); |
219 |
addRect(x, y, w, h, pdfcol, pdfcol); |
220 |
} |
220 |
} |
221 |
|
221 |
|
|
|
222 |
|
223 |
protected java.util.Vector pendingBorders = new java.util.Vector(); |
224 |
public class BorderInfo { |
225 |
public int x; |
226 |
public int y; |
227 |
public int w; |
228 |
public int h; |
229 |
public int width; |
230 |
public PDFColor c; |
231 |
public BorderInfo(int x, int y, int w, int h, int width, PDFColor c) { |
232 |
this.x = x; |
233 |
this.y = y; |
234 |
this.w = w; |
235 |
this.h = h; |
236 |
this.width = width; |
237 |
this.c = c; |
238 |
} |
239 |
} |
240 |
|
222 |
protected void doFrame(Area area) { |
241 |
protected void doFrame(Area area) { |
223 |
int w, h; |
242 |
int w, h; |
224 |
int rx = this.currentAreaContainerXPosition; |
243 |
int rx = this.currentAreaContainerXPosition; |
Lines 233-240
Link Here
|
233 |
w = w + area.getPaddingLeft() + area.getPaddingRight(); |
252 |
w = w + area.getPaddingLeft() + area.getPaddingRight(); |
234 |
h = h + area.getPaddingTop() + area.getPaddingBottom(); |
253 |
h = h + area.getPaddingTop() + area.getPaddingBottom(); |
235 |
|
254 |
|
236 |
doBackground(area, rx, ry, w, h); |
|
|
237 |
|
238 |
// rx = rx - area.getBorderLeftWidth(); |
255 |
// rx = rx - area.getBorderLeftWidth(); |
239 |
// ry = ry + area.getBorderTopWidth(); |
256 |
// ry = ry + area.getBorderTopWidth(); |
240 |
// w = w + area.getBorderLeftWidth() + area.getBorderRightWidth(); |
257 |
// w = w + area.getBorderLeftWidth() + area.getBorderRightWidth(); |
Lines 265-283
Link Here
|
265 |
int right = area.getBorderRightWidth(); |
282 |
int right = area.getBorderRightWidth(); |
266 |
int top = area.getBorderTopWidth(); |
283 |
int top = area.getBorderTopWidth(); |
267 |
int bottom = area.getBorderBottomWidth(); |
284 |
int bottom = area.getBorderBottomWidth(); |
|
|
285 |
|
286 |
doBackground(area, rx + 500/*(left == 0 ? 500 : left)*/, ry - 500/*(top == 0 ? 500 : top)*/, w - 500/*left - right / 2*/, h - 500/*bottom*/); |
287 |
|
268 |
// If style is solid, use filled rectangles |
288 |
// If style is solid, use filled rectangles |
269 |
if (top != 0) |
289 |
/* if (top != 0) |
270 |
addFilledRect(rx, ry, w, top, |
290 |
addFilledRect(rx, ry, w, top, |
271 |
new PDFColor(bp.getBorderColor(BorderAndPadding.TOP))); |
291 |
new PDFColor(bp.getBorderColor(BorderAndPadding.TOP))); |
272 |
if (left != 0) |
292 |
if (left != 0) |
273 |
addFilledRect(rx - left, ry - h - bottom, left, h + top + bottom, |
293 |
addFilledRect(rx, ry - h, left, h, |
274 |
new PDFColor(bp.getBorderColor(BorderAndPadding.LEFT))); |
294 |
new PDFColor(bp.getBorderColor(BorderAndPadding.LEFT))); |
275 |
if (right != 0) |
295 |
if (right != 0) |
276 |
addFilledRect(rx + w, ry - h - bottom, right, h + top + bottom, |
296 |
addFilledRect(rx + w, ry - h, right, h, |
277 |
new PDFColor(bp.getBorderColor(BorderAndPadding.RIGHT))); |
297 |
new PDFColor(bp.getBorderColor(BorderAndPadding.RIGHT))); |
278 |
if (bottom != 0) |
298 |
if (bottom != 0) |
279 |
addFilledRect(rx, ry - h - bottom, w, bottom, |
299 |
addFilledRect(rx, ry - h, w, bottom, |
280 |
new PDFColor(bp.getBorderColor(BorderAndPadding.BOTTOM))); |
300 |
new PDFColor(bp.getBorderColor(BorderAndPadding.BOTTOM)));*/ |
|
|
301 |
|
302 |
if (top != 0) |
303 |
// addLine(rx - top / 2, ry, rx + w + top / 2, ry, top, |
304 |
// new PDFColor(bp.getBorderColor(BorderAndPadding.TOP))); |
305 |
pendingBorders.add(new BorderInfo(rx - Math.max(left / 2, 500), ry, rx + w + Math.max(left / 2, 500), ry, top, |
306 |
new PDFColor(bp.getBorderColor(BorderAndPadding.TOP)))); |
307 |
if (left != 0) |
308 |
// addLine(rx, ry + left / 2, rx, ry - h - left / 2, left, |
309 |
// new PDFColor(bp.getBorderColor(BorderAndPadding.LEFT))); |
310 |
pendingBorders.add(new BorderInfo(rx, ry + Math.max(top / 2, 500), rx, ry - h/* - top*/, left, |
311 |
new PDFColor(bp.getBorderColor(BorderAndPadding.LEFT)))); |
312 |
if (right != 0) |
313 |
// addLine(rx + w, ry + right / 2, rx + w, ry - h - right / 2, right, |
314 |
// new PDFColor(bp.getBorderColor(BorderAndPadding.RIGHT))); |
315 |
pendingBorders.add(new BorderInfo(rx + w, ry + Math.max(top / 2, 500), rx + w, ry - h/* - top*/, right, |
316 |
new PDFColor(bp.getBorderColor(BorderAndPadding.RIGHT)))); |
317 |
if (bottom != 0) |
318 |
// addLine(rx - bottom / 2, ry - h, rx + w + bottom / 2, ry - h, bottom, |
319 |
// new PDFColor(bp.getBorderColor(BorderAndPadding.BOTTOM))); |
320 |
pendingBorders.add(new BorderInfo(rx - Math.max(left / 2, 500), ry - h, rx + w + Math.max(left / 2, 500), ry - h, bottom, |
321 |
new PDFColor(bp.getBorderColor(BorderAndPadding.BOTTOM)))); |
281 |
} |
322 |
} |
282 |
|
323 |
|
283 |
/** |
324 |
/** |