Draw the color bars for offset printing color calibration. TODO: Add more types of color bars and switch from scaling PDF to drawing them by script TODO Get this to work for content of the parameter set.
(self, e, origin)
| 913 | self.context.line((x + w + cmDistance, y + fy), (x + w + cmSize, y + fy)) |
| 914 | |
| 915 | def drawColorBars(self, e, origin): |
| 916 | """Draw the color bars for offset printing color calibration. |
| 917 | |
| 918 | TODO: Add more types of color bars and switch from scaling PDF to |
| 919 | drawing them by script |
| 920 | TODO Get this to work for content of the parameter set. |
| 921 | """ |
| 922 | |
| 923 | showColorBars = e.showColorBars or (e.isPage and self.showColorBars) |
| 924 | if not showColorBars: |
| 925 | # Nothing to do. |
| 926 | return |
| 927 | |
| 928 | ox, oy = point2D(origin) |
| 929 | |
| 930 | if ECI_GrayConL in showColorBars: |
| 931 | path = getResourcesPath() + '/' + ECI_GrayConL |
| 932 | if COLORBAR_LEFT in showColorBars: |
| 933 | self.context.image(path, p=(ox-self.pl+pt(3), oy), h=e.h) |
| 934 | |
| 935 | # TODO: Does not generate the right position? |
| 936 | if COLORBAR_RIGHT in showColorBars: |
| 937 | self.context.image(path, p=(ox+e.w+self.pr*2/3, oy), h=e.h) |
| 938 | |
| 939 | if __name__ == "__main__": |
| 940 | import sys |
no test coverage detected