Minor: Add Canvas::Transform.

This commit is contained in:
Chinmay Garde
2021-12-03 17:48:50 -08:00
committed by Dan Field
parent 4507e4f4ee
commit aea8e0293a
2 changed files with 6 additions and 0 deletions

View File

@@ -53,6 +53,10 @@ void Canvas::Concat(const Matrix& xformation) {
xformation_stack_.back().xformation = xformation * GetCurrentTransformation();
}
void Canvas::Transform(const Matrix& xformation) {
Concat(xformation);
}
const Matrix& Canvas::GetCurrentTransformation() const {
return xformation_stack_.back().xformation;
}

View File

@@ -41,6 +41,8 @@ class Canvas {
const Matrix& GetCurrentTransformation() const;
void Transform(const Matrix& xformation);
void Concat(const Matrix& xformation);
void Translate(const Vector3& offset);