Skip to content

fontlab_glyport.drawing.cocoa_drawing

cocoa_drawing

AppKit drawing classes painted with QPainter (R032).

Corpus counts (literal grep of the Glyphs corpus .py files) decided the surface: NSColor (colorWithCalibratedRed 181, white/black/text/gray/red/ blue and system colours), NSAffineTransform (transform 135), NSBezierPath (bezierPath 112, fillRect_ 46, ovals 46, rounded rects 35, rects 24, strokeLineFromPoint 12), NSFont (systemFontOfSize_ 79, fontWithName_size_ 34), NSAttributedString (92) and NSGraphicsContext save/restore. Paths keep their elements in Python and become a QPainterPath only when painted; colours become QColor. Everything paints through context.current(), so drawing outside a paint callback raises RuntimeError.

Classes

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
DRAWING_NAMES attribute
NSBackgroundColorAttributeName attribute
NSBevelLineJoinStyle attribute
NSButtLineCapStyle attribute
NSEvenOddWindingRule attribute
NSFontAttributeName attribute
NSForegroundColorAttributeName attribute
NSFrameRect function (rect) -> None
NSMiterLineJoinStyle attribute
NSNonZeroWindingRule attribute
NSParagraphStyleAttributeName attribute
NSRectFill function (rect) -> None
NSRoundLineCapStyle attribute
NSRoundLineJoinStyle attribute
NSSquareLineCapStyle attribute