ScreenSampler

public sealed class ScreenSampler
Pick a colour off the screen.

Constructors

ScreenSampler

#
public ScreenSampler()
Create a new screenpicker instance with a target bitmap size of one pixel.

ScreenSampler

#
public ScreenSampler(Size size)
Create a new screenpicker instance.
size (Size)Bitmap size, should be an odd width and height.

Properties

Radius

#
public int Radius { get; set; }
Gets or sets the radius of the colour sampling.

Size

#
public Size Size { get; }
Gets the size of the screen picker region.

Methods

Sample

#
public Color Sample(PointF location, out Bitmap bitmap)
Sample the screen at a given location. This method may throw, you should only call it from a try...catch block.
location (PointF)Sample location.
bitmap (out Bitmap)
Color at location.

Sample

#
public Color Sample(PointF location)
Sample the screen at a given location. This method may throw, you should only call it from a try...catch block.
location (PointF)Sample location.
Color at location.