summaryrefslogtreecommitdiff
path: root/fxbarcode/BC_TwoDimWriter.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-04-16 01:30:59 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-17 21:40:45 +0000
commit080dfd89269a95713d31d66829016d4885afe76b (patch)
tree7858d204a9e166f3a51be9bef5e1104514d54ac2 /fxbarcode/BC_TwoDimWriter.cpp
parent8f0bf890b4b15148a149bf9bbeead4eed6675e8a (diff)
downloadpdfium-080dfd89269a95713d31d66829016d4885afe76b.tar.xz
Remove dead barcode bitmap rendering code.
Change-Id: Idb5ef2aed456e84e0781c374b211560ab7d4fa3d Reviewed-on: https://pdfium-review.googlesource.com/4257 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxbarcode/BC_TwoDimWriter.cpp')
-rw-r--r--fxbarcode/BC_TwoDimWriter.cpp30
1 files changed, 0 insertions, 30 deletions
diff --git a/fxbarcode/BC_TwoDimWriter.cpp b/fxbarcode/BC_TwoDimWriter.cpp
index 8043244b2b..9906f35bd5 100644
--- a/fxbarcode/BC_TwoDimWriter.cpp
+++ b/fxbarcode/BC_TwoDimWriter.cpp
@@ -57,36 +57,6 @@ int32_t CBC_TwoDimWriter::GetErrorCorrectionLevel() const {
return m_iCorrectLevel;
}
-void CBC_TwoDimWriter::RenderBitmapResult(
- CFX_RetainPtr<CFX_DIBitmap>& pOutBitmap,
- int32_t& e) {
- if (m_bFixedSize) {
- pOutBitmap = CreateDIBitmap(m_Width, m_Height);
- } else {
- pOutBitmap = CreateDIBitmap(m_output->GetWidth(), m_output->GetHeight());
- }
- if (!pOutBitmap) {
- e = BCExceptionFailToCreateBitmap;
- return;
- }
- pOutBitmap->Clear(m_backgroundColor);
- int32_t leftPos = 0;
- int32_t topPos = 0;
- if (m_bFixedSize) {
- leftPos = (m_Width - m_output->GetWidth()) / 2;
- topPos = (m_Height - m_output->GetHeight()) / 2;
- }
- for (int32_t x = 0; x < m_output->GetWidth(); x++) {
- for (int32_t y = 0; y < m_output->GetHeight(); y++) {
- if (m_output->Get(x, y)) {
- pOutBitmap->SetPixel(leftPos + x, topPos + y, m_barColor);
- }
- }
- }
- if (!m_bFixedSize)
- pOutBitmap = pOutBitmap->StretchTo(m_Width, m_Height);
-}
-
void CBC_TwoDimWriter::RenderResult(uint8_t* code,
int32_t codeWidth,
int32_t codeHeight,