summaryrefslogtreecommitdiff
path: root/fxbarcode
diff options
context:
space:
mode:
Diffstat (limited to 'fxbarcode')
-rw-r--r--fxbarcode/oned/BC_OneDimWriter.cpp3
-rw-r--r--fxbarcode/oned/BC_OnedEAN13Writer.cpp9
-rw-r--r--fxbarcode/oned/BC_OnedEAN8Writer.cpp6
-rw-r--r--fxbarcode/oned/BC_OnedUPCAWriter.cpp12
4 files changed, 10 insertions, 20 deletions
diff --git a/fxbarcode/oned/BC_OneDimWriter.cpp b/fxbarcode/oned/BC_OneDimWriter.cpp
index cc0a6e5546..29c360921f 100644
--- a/fxbarcode/oned/BC_OneDimWriter.cpp
+++ b/fxbarcode/oned/BC_OneDimWriter.cpp
@@ -189,8 +189,7 @@ void CBC_OneDimWriter::ShowDeviceChars(CFX_RenderDevice* device,
if (geWidth != m_Width) {
rect.right -= 1;
}
- matrix->TransformRect(rect);
- FX_RECT re = rect.GetOuterRect();
+ FX_RECT re = matrix->TransformRect(rect).GetOuterRect();
device->FillRect(&re, m_backgroundColor);
CFX_Matrix affine_matrix(1.0, 0.0, 0.0, -1.0, (float)locX,
(float)(locY + iFontSize));
diff --git a/fxbarcode/oned/BC_OnedEAN13Writer.cpp b/fxbarcode/oned/BC_OnedEAN13Writer.cpp
index 85f545c602..9149982ebe 100644
--- a/fxbarcode/oned/BC_OnedEAN13Writer.cpp
+++ b/fxbarcode/oned/BC_OnedEAN13Writer.cpp
@@ -168,24 +168,21 @@ bool CBC_OnedEAN13Writer::ShowChars(const CFX_WideStringC& contents,
CFX_FloatRect rect((float)leftPosition, (float)(m_Height - iTextHeight),
(float)(leftPosition + strWidth - 0.5), (float)m_Height);
matr.Concat(*matrix);
- matr.TransformRect(rect);
- FX_RECT re = rect.GetOuterRect();
+ FX_RECT re = matr.TransformRect(rect).GetOuterRect();
device->FillRect(&re, m_backgroundColor);
CFX_FloatRect rect1(
(float)(leftPosition + 47 * multiple), (float)(m_Height - iTextHeight),
(float)(leftPosition + 47 * multiple + strWidth - 0.5), (float)m_Height);
CFX_Matrix matr1(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0);
matr1.Concat(*matrix);
- matr1.TransformRect(rect1);
- re = rect1.GetOuterRect();
+ re = matr1.TransformRect(rect1).GetOuterRect();
device->FillRect(&re, m_backgroundColor);
int32_t strWidth1 = multiple * 7;
CFX_Matrix matr2(m_outputHScale, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f);
CFX_FloatRect rect2(0.0f, (float)(m_Height - iTextHeight),
(float)strWidth1 - 0.5f, (float)m_Height);
matr2.Concat(*matrix);
- matr2.TransformRect(rect2);
- re = rect2.GetOuterRect();
+ re = matr2.TransformRect(rect2).GetOuterRect();
device->FillRect(&re, m_backgroundColor);
float blank = 0.0;
diff --git a/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/fxbarcode/oned/BC_OnedEAN8Writer.cpp
index ae10fe52ef..0ddafd6f17 100644
--- a/fxbarcode/oned/BC_OnedEAN8Writer.cpp
+++ b/fxbarcode/oned/BC_OnedEAN8Writer.cpp
@@ -171,16 +171,14 @@ bool CBC_OnedEAN8Writer::ShowChars(const CFX_WideStringC& contents,
CFX_FloatRect rect((float)leftPosition, (float)(m_Height - iTextHeight),
(float)(leftPosition + strWidth - 0.5), (float)m_Height);
matr.Concat(*matrix);
- matr.TransformRect(rect);
- FX_RECT re = rect.GetOuterRect();
+ FX_RECT re = matr.TransformRect(rect).GetOuterRect();
device->FillRect(&re, m_backgroundColor);
CFX_Matrix matr1(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0);
CFX_FloatRect rect1(
(float)(leftPosition + 33 * multiple), (float)(m_Height - iTextHeight),
(float)(leftPosition + 33 * multiple + strWidth - 0.5), (float)m_Height);
matr1.Concat(*matrix);
- matr1.TransformRect(rect1);
- re = rect1.GetOuterRect();
+ re = matr1.TransformRect(rect1).GetOuterRect();
device->FillRect(&re, m_backgroundColor);
strWidth = (int32_t)(strWidth * m_outputHScale);
diff --git a/fxbarcode/oned/BC_OnedUPCAWriter.cpp b/fxbarcode/oned/BC_OnedUPCAWriter.cpp
index fff4184221..07c3e7f174 100644
--- a/fxbarcode/oned/BC_OnedUPCAWriter.cpp
+++ b/fxbarcode/oned/BC_OnedUPCAWriter.cpp
@@ -127,8 +127,7 @@ bool CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents,
CFX_FloatRect rect((float)leftPosition, (float)(m_Height - iTextHeight),
(float)(leftPosition + strWidth - 0.5), (float)m_Height);
matr.Concat(*matrix);
- matr.TransformRect(rect);
- FX_RECT re = rect.GetOuterRect();
+ FX_RECT re = matr.TransformRect(rect).GetOuterRect();
device->FillRect(&re, m_backgroundColor);
CFX_Matrix matr1(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0);
CFX_FloatRect rect1((float)(leftPosition + 40 * multiple),
@@ -136,16 +135,14 @@ bool CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents,
(float)((leftPosition + 40 * multiple) + strWidth - 0.5),
(float)m_Height);
matr1.Concat(*matrix);
- matr1.TransformRect(rect1);
- re = rect1.GetOuterRect();
+ re = matr1.TransformRect(rect1).GetOuterRect();
device->FillRect(&re, m_backgroundColor);
float strWidth1 = (float)multiple * 7;
CFX_Matrix matr2(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0);
CFX_FloatRect rect2(0.0, (float)(m_Height - iTextHeight),
(float)strWidth1 - 1, (float)m_Height);
matr2.Concat(*matrix);
- matr2.TransformRect(rect2);
- re = rect2.GetOuterRect();
+ re = matr2.TransformRect(rect2).GetOuterRect();
device->FillRect(&re, m_backgroundColor);
CFX_Matrix matr3(m_outputHScale, 0.0, 0.0, 1.0, 0.0, 0.0);
CFX_FloatRect rect3((float)(leftPosition + 85 * multiple),
@@ -153,8 +150,7 @@ bool CBC_OnedUPCAWriter::ShowChars(const CFX_WideStringC& contents,
(float)((leftPosition + 85 * multiple) + strWidth1 - 0.5),
(float)m_Height);
matr3.Concat(*matrix);
- matr3.TransformRect(rect3);
- re = rect3.GetOuterRect();
+ re = matr3.TransformRect(rect3).GetOuterRect();
device->FillRect(&re, m_backgroundColor);
strWidth = strWidth * m_outputHScale;