Draw the color bars for offset printing color calibration if there is less than self.viewMinInfoPadding of space in view left padding.
(self, e, origin)
| 1236 | context.line((x + w + cmRight, y + fy), (x + w + cmRight + cmSize, y + fy)) |
| 1237 | |
| 1238 | def drawColorBars(self, e, origin): |
| 1239 | """Draw the color bars for offset printing color calibration if there |
| 1240 | is less than self.viewMinInfoPadding of space in view left padding. |
| 1241 | """ |
| 1242 | # TODO Get this to work for content of the parameter set. |
| 1243 | showColorBars = e.showColorBars or (e.isPage and self.showColorBars) |
| 1244 | if not showColorBars or self.pl < self.viewMinInfoPadding: |
| 1245 | return # Nothing to do. |
| 1246 | ox, oy = point2D(origin) |
| 1247 | |
| 1248 | # TODO: Add more types of color bars and switch from scaling PDF to |
| 1249 | # drawing them by script. |
| 1250 | if ECI_GrayConL in showColorBars: |
| 1251 | path = getResourcesPath() + '/' + ECI_GrayConL |
| 1252 | |
| 1253 | if COLORBAR_LEFT in showColorBars: |
| 1254 | x = ox - self.pl + pt(3) |
| 1255 | self.context.image(path, p=(x, oy), w=e.w, h=e.h) |
| 1256 | |
| 1257 | if COLORBAR_RIGHT in showColorBars: # TODO: Does not generate the right position? |
| 1258 | x = ox + e.w + self.pr * 2/3 |
| 1259 | self.context.image(path, p=(x, oy), w=e.w, h=e.h) |
| 1260 | |
| 1261 | # D R A W B O T S U P P O R T |
| 1262 |
no test coverage detected