Implementation of CGPattern via runtime base#2374
Conversation
d968617 to
98f2cc6
Compare
| callbacks.drawPattern = __UIColorPatternFill; | ||
|
|
||
| _pattern = (id) CGPatternCreateColorspace(self, bounds, m, bounds.size.width, bounds.size.height, 0, NO, &callbacks, pImg->_has32BitAlpha ? _ColorABGR : _ColorBGR); | ||
| _pattern = _CGPatternCreateColorspace(self, bounds, m, bounds.size.width, bounds.size.height, 0, NO, &callbacks, pImg->_has32BitAlpha ? _ColorABGR : _ColorBGR); |
There was a problem hiding this comment.
Lets remove the code in #if 0. #Resolved
| @@ -224,7 +224,7 @@ @implementation UIColor { | |||
| @public | |||
| enum BrushType _type; | |||
| UIImage* _image; | |||
There was a problem hiding this comment.
nit: while we are at this, could this be StrongId<>? #Resolved
| - (void)dealloc { | ||
| if (generatedImage) { | ||
| CGImageRelease(generatedImage); | ||
| inline CGAffineTransform TransformMatrix() const { |
There was a problem hiding this comment.
Nit: The name sounds like a verb. Adding a Get will clarify the intent. #Resolved
|
|
||
| if (generatedImage) { | ||
| CGImageRelease(generatedImage); | ||
| inline CGRect Bounds() const { |
There was a problem hiding this comment.
nit: could return const ref. #Resolved
| } else { | ||
| bitmapInfo = kCGImageAlphaNone; | ||
| colorSpace = CGColorSpaceCreateDeviceGray(); | ||
| inline CGAffineTransform PatternTransform() { |
There was a problem hiding this comment.
nit: GetPatternTransform() const #Resolved
|
|
||
| return generatedImage; | ||
| } | ||
| inline CGPatternCallbacks Callbacks() const { |
There was a problem hiding this comment.
This is unused. Either use it or delete IssuePatternCallback #Resolved
| */ | ||
| bool _CGPatternIsColored(CGPatternRef pattern); | ||
|
|
||
| COREGRAPHICS_EXPORT CGPatternRef _CGPatternCreateColorspace(void* info, |
There was a problem hiding this comment.
this doesn't actually take or create a color space? #Resolved
There was a problem hiding this comment.
|
|
||
| ; private exports below | ||
| _CGPatternCreateFromImage | ||
| _CGPatternCreateColorspace |
There was a problem hiding this comment.
this is only used internally, why is it exported? #Resolved
There was a problem hiding this comment.
actually it was in UIColor but now that's being removed. taking it out.
In reply to: 109017192 [](ancestors = 109017192)
|
@DHowett-MSFT @rajsesh-msft updated :) |
|
|
||
| return ret; | ||
| } | ||
| static const wchar_t* TAG = L"CGPattern"; |
There was a problem hiding this comment.
Seems unused with LoggingNative? #Resolved
| void* _info; | ||
| CGRect _bounds; | ||
| CGAffineTransform _transformMatrix; | ||
| CGFloat _xStep; |
There was a problem hiding this comment.
xstep and ystep could be CGSize for simplicity. #WontFix
There was a problem hiding this comment.
Also removed dependency on foundation as we removed usage and removal of NSObjects.
…fines it as void *, it should be struct __CGPattern*
…o better manage it's life time
e0f2870 to
fa7f2ec
Compare
|
Awaiting ARM test verification. |
fixes #2353