This renames several APIs off of CGAffineTransform, CGPoint, CGSize,
CGColor, CGContext, CGRect, and CGColorSpace to have more consistent
names and Swifty names, in accordance with the Swift API Design
Guidelines.
At the same time, we drop many of the special mutating variants from
the overlays, as they are not typical CG usage and a historical
artifact. Test cases added for each.
This changes how we import CGPDFContextEndPage to be
CGContext.endPDFPage(), instead of .endPage() which conflicts with
another CGContext function. Also does .beginPDFPage() for consistency,
which is consistent with e.g. drawPDFPage().
That is, import something like 'CGColorCreateGenericGray' as
"CGColor.init(gray:alpha:)" rather than "CGColorRef.init(gray:alpha:)".
Since we print the type name in diagnostic text and in fix-its, it's
important to use the name that Swift sources use.
Finishes rdar://problem/26347297.
CGPathCreateMutableCopy and CGPathCreateMutableCopyByTransformingPath
have 'self' type of CGPath, and thus must be imported as members of
CGPath proper, not CGMutablePath. Does so by following common naming
conventions for producing mutable copies.
Introduces CoreGraphics.apinotes, in which we enable the
import-as-member inference system. Additionally, include some explicit
SwiftNames, for when inference doesn't produce the right result, and
to aid compatibility with the overlays.
Refactors many of the trivial overlays out, shrinking the
CoreGraphics.swift overlay by over half. Updates in-tree test
cases. The names we currently have will be highly in flux for a while,
and are likely to change frequently over the near term.
There are a few remaining known bugs that are worked around by
apinotes entries.