drawInterpretationAreas method
- List<
MarkerIndices> ? list, - int pages,
- Paint? style
Draws the auto movements on the graph for the given list of auto movement entries and pages.
movementList
is the list of auto movement entries.
pages
is the number of pages to draw the auto movements on.
Implementation
void drawInterpretationAreas(
List<MarkerIndices>? list, int pages, Paint? style) {
for (int pageNumber = 0; pageNumber < pages; pageNumber++) {
if (list == null || list.isEmpty) return;
double? startX, stopX = 0;
for (int i = 0; i < list.length; i++) {
startX = getScreenX((list[i].getFrom() - 3), pageNumber);
stopX = getScreenX(list[i].getTo() + 3, pageNumber);
if (startX < xOrigin!) startX = xOrigin;
if (stopX < xOrigin!) stopX = xOrigin;
if (startX == stopX) continue;
//Marker
Rect zoneRect =
Rect.fromLTRB(startX!, paddingTop!, stopX!, yTocoOrigin); //50
canvas[pageNumber].drawRect(zoneRect, style!);
}
}
}