OptrisOptrisDocumentation

Documentation/OTC SDK/optris_sdk — Rust API referencev12.0

RegionStyle

pub struct RegionStyle

How a region is drawn in the overlay.

Carried by the region whatever the pipeline: honoured wherever overlays are drawn, saved into the region document a recording and a camera configuration carry, and it does not change what the region measures.

RegionStyle::new carries the SDK's own defaults, read from the library rather than restated here so the two cannot drift: a 2 px red outline, a white label, a 5 px crosshair, label and aperture both off.

RegionStyle — fields

color: [f32; 4]

The outline's red, green, blue and alpha, each 0 to 1. While an alarm rule on the region rings the overlay draws the outline pure red instead; the stored colour is untouched.

text_color: [f32; 4]

The label's red, green, blue and alpha, each 0 to 1.

line_width: f32

Outline width in pixels of the surface being drawn on.

marker_style: MarkerStyle

How a point region is marked.

marker_size: f32

Marker size in pixels: a circle's radius, or half a crosshair's arm length.

show_label: bool

Draw the region's name and reading beside it. The reading is the hottest pixel for a hot spot, the coldest for a cold spot, and the mean for every other measuring kind; a RegionKind::Label region shows its name alone.

show_aperture: bool

Outline the pixels a point region's aperture actually sampled. Needs Region::want_samples; without the samples this draws nothing rather than guessing at the nominal window.

label_anchor: LabelAnchor

Which side of the region the label sits on.

label_margin: f32

Gap between the region and its label, in pixels.

font_size: f32

Label height in pixels; 0 lets the renderer choose one that suits the frame.

RegionStyle — methods

pub fn new() -> Result<Self>

The SDK's defaults, read through the library's initialiser.

Errors

Returns Status::InvalidArgument only if the library refuses the initialiser, which means the crate and the library disagree about the struct.