コード例 #1
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");
            }
        }