MCPcopy Create free account
hub / github.com/PageBot/PageBot / _drawRegistrationMark

Method _drawRegistrationMark

Lib/pagebot/elements/views/mapview.py:817–833  ·  view source on GitHub ↗

Draw registration mark as position x, y.

(self, e, origin, cmSize, cmStrokeWidth, vertical)

Source from the content-addressed store, hash-verified

815 # M A R K E R S
816
817 def _drawRegistrationMark(self, e, origin, cmSize, cmStrokeWidth, vertical):
818 """Draw registration mark as position x, y."""
819 x, y = origin
820 if vertical:
821 dx = cmSize/2
822 dy = cmSize
823 else:
824 dx = cmSize
825 dy = cmSize/2
826 e.context.fill(noColor)
827 # Draw CMYK all on, color(cmyk=1).
828 e.context.stroke(registrationColor, w=cmStrokeWidth)
829 # Registration circle
830 e.context.circle(x, y, cmSize/4)
831 # Registration cross, in length of direction.
832 e.context.line((x - dx, y), (x + dx, y)) # Horizontal line.
833 e.context.line((x, y + dy), (x, y - dy)) # Vertical line.
834
835 def drawRegistrationMarks(self, e, origin):
836 """Draw standard registration mark, to show registration of CMYK colors.

Callers 1

drawRegistrationMarksMethod · 0.95

Calls 4

fillMethod · 0.45
strokeMethod · 0.45
circleMethod · 0.45
lineMethod · 0.45

Tested by

no test coverage detected