summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_coordinates_unittest.cpp
AgeCommit message (Collapse)Author
2018-04-10Remove CFX_Rect.Lei Zhang
It is rarely used and FX_RECT is the more common integer rect type. Change-Id: I7c5b875321c2d587becedcd058bb3a57fd1f0b61 Reviewed-on: https://pdfium-review.googlesource.com/30053 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
2018-02-16Implement operator<< for CFX_Rect and CFX_RectF.Henrique Nakashima
This is for debugging, so gated by #ifndef NDEBUG. Also make label the printed values to make them clear and differentiate top>bottom and bottom>top rect systems. Change-Id: I2d816b6b8b1be5fb5464630e771d200f2534917e Reviewed-on: https://pdfium-review.googlesource.com/26911 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
2018-01-22Tests for composing CFX_Matrix transforms.Henrique Nakashima
Bug: pdfium:987 Change-Id: Ieee2850ceec12d6fff3ba6e0fb5a775e62c5c76e Reviewed-on: https://pdfium-review.googlesource.com/23230 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org>
2018-01-19Fix CFX_Matrix.RotateAt()Henrique Nakashima
The translations were in the opposite order they should be. First the specified (x, y) coord needs to be translated to the origin, then rotation should be applied, then the translation should be reversed. To translate (x, y) to the origin, the initial translation should be Tx = -x, Ty = -y. Bug: pdfium:987 Change-Id: I7f873c6a20858bf7fd03e5fdb49020b196b44a1d Reviewed-on: https://pdfium-review.googlesource.com/23210 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Nicolás Peña Moreno <npm@chromium.org> Reviewed-by: Shirleen Lou <xlou@chromium.org>
2018-01-11Add operator<< to CFX_FloatRect.Henrique Nakashima
This helps debugging. Change-Id: I4d14dd5975d8d8f4566009ed4a4127f9c56d36dd Reviewed-on: https://pdfium-review.googlesource.com/22790 Commit-Queue: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2017-12-01Add CFX_FloatRect::Scale().Lei Zhang
Unlike ScaleFromCenterPoint(), Scale() just scales the LBRT values. Also add unit tests for CFX_FloatRect::Normalize(). Change-Id: Iebf48fa9adcf47adff3255b157d3e3056f3687fc Reviewed-on: https://pdfium-review.googlesource.com/20212 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-12-01Rename CFX_FloatRect::Scale() to ScaleFromCenterPoint().Lei Zhang
Change-Id: I6baab14c989e8ae692ed1c846b135af95c09ce37 Reviewed-on: https://pdfium-review.googlesource.com/20210 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
2017-12-01Add some CFX_FloatRect unit tests.Lei Zhang
Change-Id: I32cc3cb0a8a987980b900a5650cc051cb50dd1cc Reviewed-on: https://pdfium-review.googlesource.com/20190 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
2017-06-29Change SetReverse to GetInverse in CFX_MatrixNicolas Pena
CFX_Matrix::GetInverse is much clearer. Change-Id: Id10ab1723735332e1a78de853f28415ec3a4d834 Reviewed-on: https://pdfium-review.googlesource.com/7090 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Nicolás Peña <npm@chromium.org>
2017-04-25Add unittest for matrix reverseDan Sinclair
This Cl adds some unit tests for the CFX_Matrix Reverse method. Bug: chromium:702041 Change-Id: I9598d3eb48d6b86a3e192d313fe1091bd29a4701 Reviewed-on: https://pdfium-review.googlesource.com/4492 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>