Beispiel #1
0
        private static NSColor ColorFromString(NSString str)
        {
            if (str.HasPrefix(@"{"))
            {
                //NSDictionary dict = null;
                //NSString space = null;
                //double alpha = 0;

                //FIXME
                throw new NotImplementedException();
                return null;
            }
            else
            {
                double r, g, b;
                NSScanner scanner = (NSScanner)NSScanner.Alloc().InitWithString(str);

                r = g = b = 0;
                if (scanner.ScanDouble(ref r) &&
                scanner.ScanDouble(ref g) &&
                scanner.ScanDouble(ref b) &&
                scanner.IsAtEnd())
                {

                    return ColorWithCalibratedRed(r, g, b, 1.0);

                }
            }

            return null;
        }