コード例 #1
0
		internal static void SetImage (this CALayer layer, Xwt.Drawing.Image xwtImage, nfloat scale)
		{
			var image = xwtImage.ToNSImage ();
			layer.ContentsScale = scale;
			var layerContents = image.GetLayerContentsForContentsScale (layer.ContentsScale);

			void_objc_msgSend_IntPtr (layer.Handle, setContentsSelector, layerContents.Handle);
			layer.Bounds = new CGRect (0, 0, image.Size.Width, image.Size.Height);
		}