public void AddColorStop(object backend, double position, Xwt.Drawing.Color color)
        {
            GradientInfo gr = (GradientInfo)backend;

            gr.Colors.Add(color.ToNSColor());
            gr.Stops.Add((float)position);
        }
Example #2
0
        public override void SetBitmapPixel(object handle, int x, int y, Xwt.Drawing.Color color)
        {
            NSImage          img    = (NSImage)handle;
            NSBitmapImageRep bitmap = img.Representations().OfType <NSBitmapImageRep> ().FirstOrDefault();

            if (bitmap != null)
            {
                bitmap.SetColorAt(color.ToNSColor(), x, y);
            }
            else
            {
                throw new InvalidOperationException("Not a bitmnap image");
            }
        }