public static GetCGColor ( this c ) : CGColor | ||
c | this | |
return | CGColor |
public static CGColor GetCGColor (this Color c)
{
var t = c.Tag as ColorTag;
if (t == null) {
t = new ColorTag ();
c.Tag = t;
}
if (t.CGColor == null) {
t.CGColor = new CGColor (
c.Red / 255.0f,
c.Green / 255.0f,
c.Blue / 255.0f,
c.Alpha / 255.0f);
}
return t.CGColor;
}
}