iphone - CGLayer appearing the wrong way around -
I have found a UIView subclass that is 100 width 200 width, and I try to attract it Pixel by pixel In this case, I am trying to draw a horizontal blue line which exceeds 75%. Instead, I get two vertical blue lines (one on the edge, one in the middle), which is 75% above. It seems that the CGLayer I used has been rotated 90 degrees and 50% has shrunk. What can I do to fix this?
At the top of the .m file:
#define WORLD_WIDTH 200 #define WORLD_HEIGHT 100 # Defined ABGRB 4 4 Implementation TraceView Int theImage [WORLD_WIDTH] [WORLD_HEIGHT];
Overriding direct:
- (zero) direct: (CGRTact) shortcut {CGContextRef theViewContext = UIGraphicsGetCurrentContext (); CGLayerRef theCGLayer = CGLayerCreateWithContext (theViewContext, rect.size, void); CGContextRef theCGLayerContext = CGLayerGetContext (theCGLayer); CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB (); CGContextRef bitmapContext = CGBitmapContextCreate (IIMAG, World_Width, World_Hyate, 8, World_Width * ABGRBITES, Color Space, KCGIMAGAFFMTTIPLEED L); // ABGR is (int i = 0; i
OK, I have to do this work, I'm silly.
This works fine if I treat the array as an image [y] [x] instead of the image [x] [y].
Comments
Post a Comment