Skip to content

Commit

Permalink
Merge pull request #1144 from nakul-py/bug-fix-matrix
Browse files Browse the repository at this point in the history
bug-fix\clear-matrix
  • Loading branch information
AnshumanMahato authored Oct 11, 2024
2 parents 8dc66fe + 6c023e3 commit e375730
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Ascii.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ namespace ascii
exit(500);
}
}

void reset()
{
font->resetMatrix();
}

void print(const std::string &text)
{
vs character;
Expand Down Expand Up @@ -230,6 +236,7 @@ namespace ascii
font->pushChar(character);
}
font->printvector();
font->resetMatrix();
}
};
} // namespace ascii
Expand Down
10 changes: 10 additions & 0 deletions Fonts/fonts.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ class Fonts
}
}

void resetMatrix()
{
letters.clear();
letters.reserve(def_rows);
for(unsigned int i = 0; i < def_rows; i++) {
letters.emplace_back(100, ' ');
}
curr_col = 0;
}

/********************************adding virtual functions********************************/
// Virtual functions for space
virtual vs space()
Expand Down

0 comments on commit e375730

Please sign in to comment.