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

Method set_fill_style_rgb

web/src/canvas.rs:156–161  ·  view source on GitHub ↗

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

(&mut self, rgb: RGB)

Source from the content-addressed store, hash-verified

154
155 /// Sets the fill color of the canvas to `rgb`.
156 fn set_fill_style_rgb(&mut self, rgb: RGB) {
157 if self.fill_color != rgb {
158 self.context.set_fill_style_str(&format!("rgb({}, {}, {})", rgb.0, rgb.1, rgb.2));
159 self.fill_color = rgb;
160 }
161 }
162
163 /// Sets the stroke color of the canvas to `rgb`.
164 fn set_stroke_style_rgb(&mut self, rgb: RGB) {

Callers 2

newMethod · 0.80
set_draw_colorMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected