def getControlBounds(self, layer: GlyphSet | None = None) -> BoundingBox | None: """Returns the (xMin, yMin, xMax, yMax) bounding box of the glyph, taking only the control points into account. Args: layer: Not applicable to contours, here for API symmetry. """ return getControlBounds(self, layer)
def getControlBounds(self, layer: Optional["Layer"] = None ) -> Optional[BoundingBox]: """Returns the (xMin, yMin, xMax, yMax) bounding box of the glyph, taking only the control points into account. Gives inaccurate results with extruding curvatures. Args: layer: Not applicable to contours, here for API symmetry. """ return getControlBounds(self, layer)
def getControlBounds(self, layer: GlyphSet | None = None) -> BoundingBox | None: """Returns the (xMin, yMin, xMax, yMax) bounding box of the glyph, taking only the control points into account. Args: layer: The layer of the glyph to look up components, if any. Not needed for pure-contour glyphs. """ if layer is None and self.components: raise TypeError( "layer is required to compute bounds of components") return getControlBounds(self, layer)
def getControlBounds(self, layer: Optional["Layer"] = None ) -> Optional[BoundingBox]: """Returns the (xMin, yMin, xMax, yMax) bounding box of the glyph, taking only the control points into account. Gives inaccurate results with extruding curvatures. Args: layer: The layer of the glyph to look up components, if any. Not needed for pure-contour glyphs. """ if layer is None and self.components: raise TypeError( "layer is required to compute bounds of components") return getControlBounds(self, layer)