Have Encircle account for labels

Issue #62 resolved
Derek Kozel created an issue

It would be nice for Encircle to account for and include the label of elements.

import schemdraw
import schemdraw.elements as elm

with schemdraw.Drawing() as d:
    d += (R1 := elm.Resistor()).label('Label')
    d += elm.Line().right()
    d += elm.EncircleBox([R1])

with schemdraw.Drawing() as d:
    d += (R1 := elm.Resistor()).up().label('Label')
    d += elm.Line().right()
    d += elm.EncircleBox([R1])

Comments (2)

  1. cdelker repo owner

    Added an ‘includelabels’ parameter to Encircle and EncircleBox in fbf82ec. Defaults to True so the labels will be inside the box.

  2. Log in to comment