Skip to content

Commit 3b3c3cc

Browse files
tomas-sexenianBeta Bot
authored andcommitted
Cherry pick branch 'genexuslabs:normalize-to-rgb' into beta
1 parent 84e7439 commit 3b3c3cc

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

java/src/main/java/com/genexus/reports/PDFReportPDFBox.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ public void GxDrawRect(int left, int top, int right, int bottom, int pen, int fo
244244

245245
if (cornerRadioBL == 0 && cornerRadioBR == 0 && cornerRadioTL == 0 && cornerRadioTR == 0 && styleBottom == 0 && styleLeft == 0 && styleRight == 0 && styleTop == 0) {
246246
if (pen > 0)
247-
cb.setStrokingColor(foreRed, foreGreen, foreBlue);
247+
cb.setStrokingColor(foreRed / 255f, foreGreen / 255f, foreBlue / 255f);
248248
else
249-
cb.setStrokingColor(backRed, backGreen, backBlue);
249+
cb.setStrokingColor(backRed / 255f, backGreen / 255f, backBlue / 255f);
250250

251251
cb.addRect(x1, y1, x2 - x1, y2 - y1);
252252

@@ -280,7 +280,7 @@ public void GxDrawRect(int left, int top, int right, int bottom, int pen, int fo
280280
cRadioBR = Math.max(0, Math.min(cRadioBR, max / 2));
281281

282282
if (backMode != 0) {
283-
cb.setStrokingColor(backRed, backGreen, backBlue);
283+
cb.setStrokingColor(backRed / 255f, backGreen / 255f, backBlue / 255f);
284284
cb.setLineWidth(0);
285285
roundRectangle(cb, x1, y1, w, h,
286286
cRadioTL, cRadioTR,
@@ -290,7 +290,7 @@ public void GxDrawRect(int left, int top, int right, int bottom, int pen, int fo
290290
cb.setLineWidth(penAux);
291291
}
292292
if (pen > 0) {
293-
cb.setStrokingColor(foreRed, foreGreen, foreBlue);
293+
cb.setStrokingColor(foreRed / 255f, foreGreen / 255f, foreBlue / 255f);
294294
drawRectangle(cb, x1, y1, w, h,
295295
styleTop, styleBottom, styleRight, styleLeft,
296296
cRadioTL, cRadioTR,
@@ -324,7 +324,7 @@ public void GxDrawLine(int left, int top, int right, int bottom, int width, int
324324
y2 = pageSize.getUpperRightY() - topAux - topMargin -bottomMargin;
325325

326326
cb.saveGraphicsState();
327-
cb.setStrokingColor(foreRed, foreGreen, foreBlue);
327+
cb.setStrokingColor(foreRed / 255f, foreGreen / 255f, foreBlue / 255f);
328328
cb.setLineWidth(widthAux);
329329

330330
if (lineCapProjectingSquare) {

0 commit comments

Comments
 (0)