(self, gc, marker_path, marker_trans, path, trans,
rgbFace=None)
| 395 | self.image_counter = 0 |
| 396 | |
| 397 | def draw_markers(self, gc, marker_path, marker_trans, path, trans, |
| 398 | rgbFace=None): |
| 399 | # docstring inherited |
| 400 | |
| 401 | _writeln(self.fh, r"\begin{pgfscope}") |
| 402 | |
| 403 | # convert from display units to in |
| 404 | f = 1. / self.dpi |
| 405 | |
| 406 | # set style and clip |
| 407 | self._print_pgf_clip(gc) |
| 408 | self._print_pgf_path_styles(gc, rgbFace) |
| 409 | |
| 410 | # build marker definition |
| 411 | bl, tr = marker_path.get_extents(marker_trans).get_points() |
| 412 | coords = bl[0] * f, bl[1] * f, tr[0] * f, tr[1] * f |
| 413 | _writeln(self.fh, |
| 414 | r"\pgfsys@defobject{currentmarker}" |
| 415 | r"{\pgfqpoint{%fin}{%fin}}{\pgfqpoint{%fin}{%fin}}{" % coords) |
| 416 | self._print_pgf_path(None, marker_path, marker_trans) |
| 417 | self._pgf_path_draw(stroke=gc.get_linewidth() != 0.0, |
| 418 | fill=rgbFace is not None) |
| 419 | _writeln(self.fh, r"}") |
| 420 | |
| 421 | maxcoord = 16383 / 72.27 * self.dpi # Max dimensions in LaTeX. |
| 422 | clip = (-maxcoord, -maxcoord, maxcoord, maxcoord) |
| 423 | |
| 424 | # draw marker for each vertex |
| 425 | for point, code in path.iter_segments(trans, simplify=False, |
| 426 | clip=clip): |
| 427 | x, y = point[0] * f, point[1] * f |
| 428 | _writeln(self.fh, r"\begin{pgfscope}") |
| 429 | _writeln(self.fh, r"\pgfsys@transformshift{%fin}{%fin}" % (x, y)) |
| 430 | _writeln(self.fh, r"\pgfsys@useobject{currentmarker}{}") |
| 431 | _writeln(self.fh, r"\end{pgfscope}") |
| 432 | |
| 433 | _writeln(self.fh, r"\end{pgfscope}") |
| 434 | |
| 435 | def draw_path(self, gc, path, transform, rgbFace=None): |
| 436 | # docstring inherited |
nothing calls this directly
no test coverage detected