mirror of
https://github.com/qpdf/qpdf.git
synced 2024-09-24 11:09:07 +00:00
Add QPDFMatrix::operator==
This commit is contained in:
parent
552303a94a
commit
a2124f992c
@ -1,5 +1,7 @@
|
|||||||
2021-03-03 Jay Berkenbilt <ejb@ql.org>
|
2021-03-03 Jay Berkenbilt <ejb@ql.org>
|
||||||
|
|
||||||
|
* Add QPDFMatrix::operator==
|
||||||
|
|
||||||
* Add QPDFObjectHandle::makeResourcesIndirect
|
* Add QPDFObjectHandle::makeResourcesIndirect
|
||||||
|
|
||||||
2021-03-02 Jay Berkenbilt <ejb@ql.org>
|
2021-03-02 Jay Berkenbilt <ejb@ql.org>
|
||||||
|
@ -90,6 +90,16 @@ class QPDFMatrix
|
|||||||
QPDFObjectHandle::Rectangle transformRectangle(
|
QPDFObjectHandle::Rectangle transformRectangle(
|
||||||
QPDFObjectHandle::Rectangle r);
|
QPDFObjectHandle::Rectangle r);
|
||||||
|
|
||||||
|
// operator== tests for exact equality, not considering deltas for
|
||||||
|
// floating point.
|
||||||
|
QPDF_DLL
|
||||||
|
bool operator==(QPDFMatrix const& rhs) const;
|
||||||
|
QPDF_DLL
|
||||||
|
bool operator!=(QPDFMatrix const& rhs) const
|
||||||
|
{
|
||||||
|
return ! operator==(rhs);
|
||||||
|
}
|
||||||
|
|
||||||
double a;
|
double a;
|
||||||
double b;
|
double b;
|
||||||
double c;
|
double c;
|
||||||
|
@ -142,3 +142,14 @@ QPDFMatrix::transformRectangle(QPDFObjectHandle::Rectangle r) const
|
|||||||
*std::max_element(tx.begin(), tx.end()),
|
*std::max_element(tx.begin(), tx.end()),
|
||||||
*std::max_element(ty.begin(), ty.end()));
|
*std::max_element(ty.begin(), ty.end()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
QPDFMatrix::operator==(QPDFMatrix const& rhs) const
|
||||||
|
{
|
||||||
|
return ((this->a == rhs.a) &&
|
||||||
|
(this->b == rhs.b) &&
|
||||||
|
(this->c == rhs.c) &&
|
||||||
|
(this->d == rhs.d) &&
|
||||||
|
(this->e == rhs.e) &&
|
||||||
|
(this->f == rhs.f));
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user