MCPcopy Create free account
hub / github.com/endbasic/endbasic / set_stroke_style_rgb

Method set_stroke_style_rgb

web/src/canvas.rs:164–169  ·  view source on GitHub ↗

Sets the stroke color of the canvas to `rgb`.

(&mut self, rgb: RGB)

Source from the content-addressed store, hash-verified

162
163 /// Sets the stroke color of the canvas to `rgb`.
164 fn set_stroke_style_rgb(&mut self, rgb: RGB) {
165 if self.stroke_color != rgb {
166 self.context.set_stroke_style_str(&format!("rgb({}, {}, {})", rgb.0, rgb.1, rgb.2));
167 self.stroke_color = rgb;
168 }
169 }
170
171 /// Defines a canvas path for a polygon.
172 fn poly_path(&self, points: &[PixelsXY]) {

Callers 2

newMethod · 0.80
set_draw_colorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected