logo
pub struct DeviceDescriptor { /* private fields */ }
Expand description

A builder of libR_sys::DevDesc.

Implementations

Sets the device sizes (unit: point).

If not specified, the following numbers (7 inches square, following the R Internals’ convetion) will be used.

  • left: 0
  • right: 7 inches * points per inch = 7 * 72
  • bottom: 0
  • top: 7 inches * points per inch = 7 * 72

Please note that, depending on the the coordinate system of the device, left might be larger than right, or bottom larger than top (for example, in SVG, the origin is at the top left corner).

Sets inches per raster unit (i.e. point). Note that most of the cases, there’s no need to change this value.

A point is usually 1/72 (the default value), but another value can be specified here to scale the device. The first element is width, the second is height.

Sets the font size (unit: point). Note that most of the cases, there’s no need to change this value.

The first element is width, the second is height. If not specified, [0.9 * 12.0, 1.2 * 12.0], which is suggested by the R Internals as “a good choice” will be used (12 point is the usual default for graphics devices).

Sets the initial value of pointsize.

If not specified, 12, which is the usual default for graphics devices, will be used.

Sets the initial value of colour.

If not specified, black (0x000000) will be used.

Sets the initial value of fill.

If not specified, white (0xffffff) will be used.

Sets the initial value of line type.

If not specified, LineType::Solid will be used.

Sets the initial value of font face.

If not specified, FontFace::Plain will be used.

Trait Implementations

Returns the “default value” for a type. Read more

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 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.