Is this code drawing at the point or pixel level? How to draw retina pixels?
问题 Consider this admirable script which draws a (circular) gradient, https://github.com/paiv/AngleGradientLayer/blob/master/AngleGradient/AngleGradientLayer.m int w = CGRectGetWidth(rect); int h = CGRectGetHeight(rect); and then angleGradient(data, w, h .. and the it loops over all those for (int y = 0; y < h; y++) for (int x = 0; x < w; x++) { basically setting the color *p++ = color; But wait - wouldn't this be working by points, not pixels ? How, really, would you draw to the physical pixels