logo
pub struct Device { /* private fields */ }

Implementations

Get the current device.

Enable device rendering.

Disable device rendering and flush.

Get the device number for this device.

Get a device by number.

Convert device coordinates into a specified unit. This is usually done by the API.

Convert a specified unit coordinates into device coordinates. This is usually done by the API.

Convert device width/height coordinates into a specified unit. This is usually done by the API.

Convert a specified unit width/height coordinates into device coordinates. This is usually done by the API.

Start a new page. The page color can be set in advance.

Change the clip rectangle.

Draw a stroked line. gc.color() is the stroke color.

Draw a stroked/filled polyline. gc.color() is the stroke color. The input is anything yielding (x,y) coordinate pairs. Polylines are not closed.

Draw a stroked/filled polygon. gc.color() is the stroke color. The input is anything yielding (x,y) coordinate pairs. Polygons are closed.

Draw a stroked/filled circle. gc.color() is the stroke color. gc.fill() is the fill color.

Draw a stroked/filled axis-aligned rectangle. gc.color() is the stroke color. gc.fill() is the fill color.

Draw a path with multiple segments. gc.color() is the stroke color. gc.fill() is the fill color. The input is an interator of iterators yielding (x,y) pairs.

Screen capture. Returns an integer matrix representing pixels if it is able.

Draw a bitmap.

Draw a text string starting at pos. TODO: do we need to convert units?

Get the metrics for a single unicode codepoint.

Get the width of a unicode string.

Get the height of a unicode string.

Get the metrics for a unicode string.

Get the width of a mathematical expression.

Get the height of a mathematical expression.

Get the metrics for a mathematical expression.

Draw a mathematical expression.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

This method tests for !=.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.