/** * @since Available in iOS 2.0 and later. */ public static CGBitmapContext create(long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo) { return create((IntPtr)null, width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo); } /**
/** * @since Available in iOS 4.0 and later. */ public static CGBitmapContext create(long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo, ReleaseDataCallback releaseCallback) { return create((IntPtr)null, width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo, releaseCallback); } /**
/** * @since Available in iOS 4.0 and later. */ public static CGBitmapContext create(IntPtr data, long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo, ReleaseDataCallback releaseCallback) { long releaseInfo = CGBitmapContext.releaseInfo.getAndIncrement(); CGBitmapContext result = create(data, width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo, new FunctionPtr(cbReleaseData), releaseInfo); if (result != null) { synchronized (callbacks) { callbacks.put(releaseInfo, releaseCallback); } } return result; }
/** * @since Available in iOS 2.0 and later. */ public static CGBitmapContext create(long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGImageAlphaInfo alphaInfo) { return create((IntPtr)null, width, height, bitsPerComponent, bytesPerRow, space, new CGBitmapInfo(alphaInfo.value())); } /**
/** * @since Available in iOS 4.0 and later. */ public static CGBitmapContext create(byte[] data, long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo, ReleaseDataCallback releaseCallback) { BytePtr ptr = new BytePtr(); ptr.set(data); return create(ptr.as(IntPtr.class), width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo, releaseCallback); } /**
/** * @since Available in iOS 2.0 and later. */ public static CGBitmapContext create(byte[] data, long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo) { BytePtr ptr = new BytePtr(); ptr.set(data); return create(ptr.as(IntPtr.class), width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo); } /**
/** * @since Available in iOS 2.0 and later. */ public static CGBitmapContext create(byte[] data, long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGImageAlphaInfo alphaInfo) { BytePtr ptr = new BytePtr(); ptr.set(data); return create(ptr.as(IntPtr.class), width, height, bitsPerComponent, bytesPerRow, space, new CGBitmapInfo(alphaInfo.value())); } /**
/** * @since Available in iOS 2.0 and later. */ public static CGBitmapContext create(long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo) { return create((IntPtr)null, width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo); } /**
/** * @since Available in iOS 2.0 and later. */ public static CGBitmapContext create(long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo) { return create((IntPtr)null, width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo); } /**
/** * @since Available in iOS 4.0 and later. */ public static CGBitmapContext create(long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo, ReleaseDataCallback releaseCallback) { return create((IntPtr)null, width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo, releaseCallback); } /**
/** * @since Available in iOS 4.0 and later. */ public static CGBitmapContext create(IntPtr data, long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo, ReleaseDataCallback releaseCallback) { long releaseInfo = CGBitmapContext.releaseInfo.getAndIncrement(); CGBitmapContext result = create(data, width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo, new FunctionPtr(cbReleaseData), releaseInfo); if (result != null) { synchronized (callbacks) { callbacks.put(releaseInfo, releaseCallback); } } return result; }
/** * @since Available in iOS 4.0 and later. */ public static CGBitmapContext create(IntPtr data, long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo, ReleaseDataCallback releaseCallback) { long releaseInfo = CGBitmapContext.releaseInfo.getAndIncrement(); CGBitmapContext result = create(data, width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo, new FunctionPtr(cbReleaseData), releaseInfo); if (result != null) { synchronized (callbacks) { callbacks.put(releaseInfo, releaseCallback); } } return result; }
static CGBitmapContext createCGBitmap(int width, int height) { return CGBitmapContext.create(width, height, 8, 4 * width, colorSpace, new CGBitmapInfo( CGImageAlphaInfo.PremultipliedLast.value())); }
/** * @since Available in iOS 2.0 and later. */ public static CGBitmapContext create(long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGImageAlphaInfo alphaInfo) { return create((IntPtr)null, width, height, bitsPerComponent, bytesPerRow, space, new CGBitmapInfo(alphaInfo.value())); } /**
/** * @since Available in iOS 2.0 and later. */ public static CGBitmapContext create(byte[] data, long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo) { BytePtr ptr = new BytePtr(); ptr.set(data); return create(ptr.as(IntPtr.class), width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo); } /**
/** * @since Available in iOS 4.0 and later. */ public static CGBitmapContext create(byte[] data, long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo, ReleaseDataCallback releaseCallback) { BytePtr ptr = new BytePtr(); ptr.set(data); return create(ptr.as(IntPtr.class), width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo, releaseCallback); } /**
/** * @since Available in iOS 2.0 and later. */ public static CGBitmapContext create(byte[] data, long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo) { BytePtr ptr = new BytePtr(); ptr.set(data); return create(ptr.as(IntPtr.class), width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo); } /**
/** * @since Available in iOS 4.0 and later. */ public static CGBitmapContext create(byte[] data, long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGBitmapInfo bitmapInfo, ReleaseDataCallback releaseCallback) { BytePtr ptr = new BytePtr(); ptr.set(data); return create(ptr.as(IntPtr.class), width, height, bitsPerComponent, bytesPerRow, space, bitmapInfo, releaseCallback); } /**
/** * @since Available in iOS 2.0 and later. */ public static CGBitmapContext create(byte[] data, long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGImageAlphaInfo alphaInfo) { BytePtr ptr = new BytePtr(); ptr.set(data); return create(ptr.as(IntPtr.class), width, height, bitsPerComponent, bytesPerRow, space, new CGBitmapInfo(alphaInfo.value())); } /**
/** * @since Available in iOS 2.0 and later. */ public static CGBitmapContext create(byte[] data, long width, long height, long bitsPerComponent, long bytesPerRow, CGColorSpace space, CGImageAlphaInfo alphaInfo) { BytePtr ptr = new BytePtr(); ptr.set(data); return create(ptr.as(IntPtr.class), width, height, bitsPerComponent, bytesPerRow, space, new CGBitmapInfo(alphaInfo.value())); } /**