You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PDF only: Insert text into the specified rectangle. The text will be split into lines and words and then filled into the available space, starting from one of the four rectangle corners, which depends on `rotate`. Line feeds and multiple space will be respected.
337
339
@@ -591,7 +593,7 @@ Common Parameters
591
593
592
594
Both values are floats in range [0, 1]. Negative values or values > 1 will ignored (in most cases). Both set the transparency such that a value 0.5 corresponds to 50% transparency, 0 means invisible and 1 means intransparent. For e.g. a rectangle the stroke opacity applies to its border and fill opacity to its interior.
593
595
594
-
For text insertions (:meth:`Shape.insert_text` and :meth:`Shape.insert_textbox`), use *fill_opacity* for the text. At first sight this seems surprising, but it becomes obvious when you look further down to *render_mode*: *fill_opacity* applies to the yellow and *stroke_opacity* applies to the blue color.
596
+
For text insertions (:meth:`Shape.insert_text` and :meth:`Shape.insert_textbox`), use *fill_opacity* for the text. At first sight this seems surprising, but it becomes obvious when you look further down to `render_mode`: `fill_opacity` applies to the yellow and `stroke_opacity` applies to the blue color.
595
597
596
598
----
597
599
@@ -616,6 +618,28 @@ Common Parameters
616
618
617
619
----
618
620
621
+
**miter_limit** (*float*)
622
+
623
+
A float specifying the maximum acceptable value of the quotient `miter-length / line-width` ("miter quotient"). Used in text output methods. This is only relevant for non-zero render mode values -- then, characters are written with border lines (i.e. "stroked").
624
+
625
+
If two lines stroking some character meet at a sharp (<= 90°) angle and the line width is large enough, then "spikes" may become visible -- causing an ugly appearance as shown below. For more background, see page 126 of the :ref:`AdobeManual`.
626
+
627
+
For instance, when joins meet at 90°, then the miter length is ``sqrt(2) * line-width``, so the miter quotient is ``sqrt(2)``.
628
+
629
+
If ``miter_limit`` is exceeded, then all joins with a larger qotient will appear as beveled ("butt" appearance).
630
+
631
+
The default value 1 (and any smaller value) will ensure that all joins are rendered as a butt. A value of ``None`` will use the PDF default value.
632
+
633
+
Example text showing spikes (``miter_limit=None``):
634
+
635
+
.. image:: images/spikes-yes.*
636
+
637
+
Example text suppressing spikes (``miter_limit=1``):
638
+
639
+
.. image:: images/spikes-no.*
640
+
641
+
----
642
+
619
643
**overlay** (*bool*)
620
644
621
645
Causes the item to appear in foreground (default) or background.
0 commit comments