MCPcopy Create free account
hub / github.com/cpmech/plotpy / options_shared

Method options_shared

src/canvas.rs:1083–1101  ·  view source on GitHub ↗

Returns shared options

(&self)

Source from the content-addressed store, hash-verified

1081
1082 /// Returns shared options
1083 fn options_shared(&self) -> String {
1084 let mut opt = String::new();
1085 if self.edge_color != "" {
1086 write!(&mut opt, ",edgecolor='{}'", self.edge_color).unwrap();
1087 }
1088 if self.face_color != "" {
1089 write!(&mut opt, ",facecolor='{}'", self.face_color).unwrap();
1090 }
1091 if self.line_width > 0.0 {
1092 write!(&mut opt, ",linewidth={}", self.line_width).unwrap();
1093 }
1094 if self.line_style != "" {
1095 write!(&mut opt, ",linestyle='{}'", self.line_style).unwrap();
1096 }
1097 if self.stop_clip {
1098 write!(&mut opt, ",clip_on=False").unwrap();
1099 }
1100 opt
1101 }
1102
1103 /// Returns options for arrows
1104 fn options_arrow(&self) -> String {

Callers 9

draw_arcMethod · 0.80
draw_arrowMethod · 0.80
draw_circleMethod · 0.80
polycurve_endMethod · 0.80
draw_polycurveMethod · 0.80
draw_polylineMethod · 0.80
draw_rectangleMethod · 0.80
draw_gridMethod · 0.80
options_shared_worksFunction · 0.80

Calls

no outgoing calls

Tested by 1

options_shared_worksFunction · 0.64