Open user202729 opened 6 months ago
Looking at it:
\begin{scope}[scale=2]
, the equivalent of scaling a whole canvas will also scale text size.⟨text⟩.bbox().enlarge
, but enlarge
is only available on bbox
object, and you can only convert bbox
into path.rect
, not box.rect
it seemsDid I miss something? (It sounds like a good idea to provide method to convert bbox
to box.rect
instance, although rect()
method is already used)
Actually, I think there's no disadvantage in making bbox
subclass from box.rect
? (But will break backwards compatibility because center
method etc.)
I really like and appreciate your documentation efforts.
I am not quite sure whether we should have it as part of the one and single manual, though. Still, we might just merge and maybe split it later on. Jörg, would this be fine with you?
Regarding your request with scaling content: You can insert a canvas (sc
) into another canvas (c
) while applying transformations to it: c.insert(sc, [trafo.scale(2)])
.
I consider the box module and code quite incomplete. It is fine to propose some extensions. For example, we could add .box()
methods everywhere. In some sense they could be the official way to work, while bbox'es really should be internal.
No, I already included it there. Just that that also scales the line width, which is the equivalent of TikZ' transform canvas
and hardly what the user wants.
wobsta wrote:
I am not quite sure whether we should have it as part of the one and single manual, though. Still, we might just merge and maybe split it later on. Jörg, would this be fine with you?
I am also a bit torn - which is why I brought you in the discussion. But for me, merging now and maybe splitting it later would be fine. The documentation per se is useful.
user202729 wrote:
No, I already included it there. Just that that also scales the line width, which is the equivalent of TikZ'
transform canvas
and hardly what the user wants.
Globally, what you want can be achieved by using unit.set(uscale=2). This scales all "user" lengths by a factor of 2 while leaving both the pre-defined linewidths and TeX sizes invariant. See the documentation of the unit module.
I think this could be useful, as a sizable number of TeX users are familiar with TikZ.