[MonoTouch] Bug in CGPDFDictionary.cs
Jeff Stedfast
jeff at xamarin.com
Tue Oct 18 15:20:53 EDT 2011
Hi Mirco,
Great catch! I've just fixed this in git master, monotouch-4.2, and
monotouch-5.0 branches so the next release of 5.2.x or 5.0.x should have my
fix.
Thanks for spotting this!
Jeff
On Tue, Oct 18, 2011 at 6:27 AM, Mirco Cortecchia <develop at psmobile.it>wrote:
> Hello,
> I think i have found a bug in the CGPDFDictionary.cs class. There is a
> problem in the function "MapFromCGPdfObject" where the cases are all shifted
> by 1; (null=0, boolean=1,....).
> But according to the mac os developer documentation the enum should be:
>
> enum CGPDFObjectType <http://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGPDFObject/Reference/reference.html#//apple_ref/doc/c_ref/CGPDFObjectType> {
> kCGPDFObjectTypeNull <http://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGPDFObject/Reference/reference.html#//apple_ref/doc/c_ref/kCGPDFObjectTypeNull> = 1,
> kCGPDFObjectTypeBoolean <http://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGPDFObject/Reference/reference.html#//apple_ref/doc/c_ref/kCGPDFObjectTypeBoolean>,
> kCGPDFObjectTypeInteger <http://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGPDFObject/Reference/reference.html#//apple_ref/doc/c_ref/kCGPDFObjectTypeInteger>,
> kCGPDFObjectTypeReal <http://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGPDFObject/Reference/reference.html#//apple_ref/doc/c_ref/kCGPDFObjectTypeReal>,
> kCGPDFObjectTypeName <http://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGPDFObject/Reference/reference.html#//apple_ref/doc/c_ref/kCGPDFObjectTypeName>,
> kCGPDFObjectTypeString <http://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGPDFObject/Reference/reference.html#//apple_ref/doc/c_ref/kCGPDFObjectTypeString>,
> kCGPDFObjectTypeArray <http://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGPDFObject/Reference/reference.html#//apple_ref/doc/c_ref/kCGPDFObjectTypeArray>,
> kCGPDFObjectTypeDictionary <http://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGPDFObject/Reference/reference.html#//apple_ref/doc/c_ref/kCGPDFObjectTypeDictionary>,
> kCGPDFObjectTypeStream <http://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGPDFObject/Reference/reference.html#//apple_ref/doc/c_ref/kCGPDFObjectTypeStream>
> };typedef enum CGPDFObjectType <http://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/CGPDFObject/Reference/reference.html#//apple_ref/doc/c_ref/CGPDFObjectType> CGPDFObjectType;
>
> so the case should start from 1 (null=1, boolean=2...)
>
>
> I'm using Monotouch 4.2.2.
>
> Bye
> Mirco
>
>
> _______________________________________________
> MonoTouch mailing list
> MonoTouch at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monotouch
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monotouch/attachments/20111018/11920b06/attachment.html
More information about the MonoTouch
mailing list