Skip to content

Commit

Permalink
Minor: Add Canvas::Transform.
Browse files Browse the repository at this point in the history
  • Loading branch information
chinmaygarde authored and dnfield committed Apr 27, 2022
1 parent 18399a5 commit 4234b34
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions impeller/aiks/canvas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 2 additions & 0 deletions impeller/aiks/canvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 4234b34

Please sign in to comment.