diff --git a/gfx/matrix_none.h b/gfx/matrix_none.h index d6de3a577..e7a487329 100644 --- a/gfx/matrix_none.h +++ b/gfx/matrix_none.h @@ -1,5 +1,5 @@ // LAF Gfx Library -// Copyright (c) 2020 Igara Studio S.A. +// Copyright (c) 2020-2023 Igara Studio S.A. // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. @@ -46,6 +46,11 @@ namespace gfx { void setScaleTranslate(float sx, float sy, float tx, float ty) { } Matrix& preTranslate(float dx, float dy) { return *this; } Matrix& postTranslate(float dx, float dy) { return *this; } + + Matrix& setConcat(const Matrix& a, const Matrix& b) { return *this; } + Matrix& preConcat(const Matrix& other) { return *this; } + Matrix& postConcat(const Matrix& other) { return *this; } + RectF mapRect(const RectF& src) const { return RectF(); } }; diff --git a/gfx/matrix_skia.h b/gfx/matrix_skia.h index 5a28e51ea..562beae14 100644 --- a/gfx/matrix_skia.h +++ b/gfx/matrix_skia.h @@ -1,5 +1,5 @@ // LAF Gfx Library -// Copyright (c) 2020 Igara Studio S.A. +// Copyright (c) 2020-2023 Igara Studio S.A. // // This file is released under the terms of the MIT license. // Read LICENSE.txt for more information. @@ -99,6 +99,21 @@ namespace gfx { return *this; } + Matrix& setConcat(const Matrix& a, const Matrix& b) { + m_skMatrix.setConcat(a.m_skMatrix, b.m_skMatrix); + return *this; + } + + Matrix& preConcat(const Matrix& other) { + m_skMatrix.preConcat(other.m_skMatrix); + return *this; + } + + Matrix& postConcat(const Matrix& other) { + m_skMatrix.postConcat(other.m_skMatrix); + return *this; + } + RectF mapRect(const RectF& src) const { SkRect dst; m_skMatrix.mapRect(&dst, SkRect::MakeXYWH(SkScalar(src.x), SkScalar(src.y),