[coregraphics] Added ScreenImage overload for Xamarin Mac allowing for more options (#5056)

This commit is contained in:
Michiel Sioen 2018-10-31 16:12:44 +01:00 коммит произвёл Sebastien Pouliot
Родитель 0304219723
Коммит def919add8
1 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@ -216,12 +216,18 @@ namespace CoreGraphics {
static extern IntPtr CGWindowListCreateImage(CGRect screenBounds, CGWindowListOption windowOption, uint windowID, CGWindowImageOption imageOption);
public static CGImage ScreenImage (int windownumber, CGRect bounds)
{
IntPtr imageRef = CGWindowListCreateImage(bounds, CGWindowListOption.IncludingWindow, (uint)windownumber,
CGWindowImageOption.Default);
{
return ScreenImage (windownumber, bounds, CGWindowListOption.IncludingWindow, CGWindowImageOption.Default);
}
public static CGImage ScreenImage (int windownumber, CGRect bounds, CGWindowListOption windowOption,
CGWindowImageOption imageOption)
{
IntPtr imageRef = CGWindowListCreateImage (bounds, windowOption, (uint) windownumber,
imageOption);
if (imageRef == IntPtr.Zero)
return null;
return new CGImage(imageRef, true);
return new CGImage (imageRef, true);
}
#elif !WATCH
public static CGImage ScreenImage {