Struct autopilot::bitmap::Bitmap [] [src]

pub struct Bitmap {
    pub image: DynamicImage,
    pub size: Size,
    pub scale: f64,
}

Fields

Size of the bitmap in points.

Methods

impl Bitmap
[src]

[src]

Creates a bitmap from the given DynamicImage, and scale if given (defaults to 1).

[src]

Returns bounds of bitmap as a rect, with an origin of zero.

[src]

Copies image to pasteboard. Currently only supported on macOS.

[src]

Returns new Bitmap created from a portion of another.

[src]

[src]

Returns true if bitmap is equal to needle with the given tolerance.

[src]

Attempts to find color inside rect in bmp from the given start_point. Returns coordinates if found, or None if not. If rect is None, bmp.bounds() is used instead. If start_point is None, the origin of rect is used.

Tolerance is defined as a float in the range from 0 to 1, where 0 is an exact match and 1 matches anything.

[src]

Returns list of all coordinates inside rect in bmp matching color from the given start_point. If rect is None, bmp.bounds() is used instead. If start_point is None, the origin of rect is used.

[src]

Returns count of color in bitmap. Functionally equivalent to:

This example is not tested
find_every_color(color, tolerance, rect, start_point).count()

[src]

Attempts to find needle inside rect in bmp from the given start_point. Returns coordinates if found, or None if not. If rect is None, bmp.bounds() is used instead. If start_point is None, the origin of rect is used.

Tolerance is defined as a float in the range from 0 to 1, where 0 is an exact match and 1 matches anything.

[src]

Returns list of all coordinates inside rect in bmp matching needle from the given start_point. If rect is None, bmp.bounds is used instead. If start_point is None, the origin of rect is used.

[src]

Returns count of occurrences of needle in bmp. Functionally equivalent to:

This example is not tested
find_every_bitmap(color, tolerance, rect, start_point).count()

Trait Implementations

impl Clone for Bitmap
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Debug for Bitmap
[src]

[src]

Formats the value using the given formatter. Read more

impl PartialEq for Bitmap
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

1.0.0
[src]

This method tests for !=.

impl Hash for Bitmap
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more

Auto Trait Implementations

impl Send for Bitmap

impl Sync for Bitmap