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,20 @@ 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) / (border line width)`. 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"). If two lines stroking a character meet at a sharp (<= 90°) angle and the border line width is large enough, then "spikes" may become visible -- causing an ugly appearance. For visualization of this see page 126 of the :ref:`AdobeManual`. For instance, when joined lines meet at an angle of 90°, then the miter length is ``sqrt(2) * (border line width)``, so their miter quotient is ``sqrt(2)``. If ``miter_limit`` is exceeded, then all line joins meeting at a sharper angle will be appear as beveled ("butt" appearance). The default value 1 will ensure that line joins always appear as beveled. A value of ``None`` will cause a PDF default value.
624
+
625
+
Example text showing spikes (``miter_limit=None``):
626
+
627
+
.. image:: images/img-rendermode.*
628
+
629
+
Example text suppressing spikes (``miter_limit=1``):
630
+
631
+
.. image:: images/img-rendermode.*
632
+
633
+
----
634
+
619
635
**overlay** (*bool*)
620
636
621
637
Causes the item to appear in foreground (default) or background.
0 commit comments