Add a polygon. The polygon has to be convex.
(&mut self, mut polygon: crate::Polygon<'a>)
| 2036 | |
| 2037 | /// Add a polygon. The polygon has to be convex. |
| 2038 | pub fn polygon(&mut self, mut polygon: crate::Polygon<'a>) { |
| 2039 | if polygon.series.is_empty() { |
| 2040 | return; |
| 2041 | } |
| 2042 | |
| 2043 | // Give the stroke an automatic color if no color has been assigned. |
| 2044 | if polygon.stroke.color == Color32::TRANSPARENT { |
| 2045 | polygon.stroke.color = self.auto_color(); |
| 2046 | } |
| 2047 | self.items.push(Box::new(polygon)); |
| 2048 | } |
| 2049 | |
| 2050 | /// Add a text. |
| 2051 | pub fn text(&mut self, text: crate::Text) { |
no test coverage detected