···
111
111
.map(|note| note.pitch);
112
112
113
113
let area = (2, 2);
114
114
+
let bounds = canvas.world_region.resized(-2, -2);
114
115
ctx.extra.bass_pattern_at = match pitch {
115
115
-
Some(32 | 33 | 34) => {
116
116
-
canvas.world_region.starting_from_topleft(area)
117
117
-
}
118
118
-
Some(39) => canvas.world_region.starting_from_topright(area),
119
119
-
Some(35) => canvas.world_region.starting_from_bottomleft(area),
120
120
-
Some(42 | 41) => {
121
121
-
canvas.world_region.starting_from_bottomright(area)
122
122
-
}
123
123
-
_ => canvas.world_region.starting_from_bottomleft(area),
116
116
+
Some(32 | 33 | 34) => bounds.starting_from_topleft(area),
117
117
+
Some(39) => bounds.starting_from_topright(area),
118
118
+
Some(35) => bounds.starting_from_bottomleft(area),
119
119
+
Some(42 | 41) => bounds.starting_from_bottomright(area),
120
120
+
_ => bounds.starting_from_bottomleft(area),
124
121
}
125
122
.unwrap();
126
123