[coregraphics] Added ScreenImage overload for Xamarin Mac allowing for more options (#5056)
This commit is contained in:
Родитель
0304219723
Коммит
def919add8
|
@ -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 {
|
||||
|
|
Загрузка…
Ссылка в новой задаче