pdfium/core/fxge/cfx_glyphbitmap.h
Tom Sepez 45df513270 Always create CFX_DIBitmaps before CFX_GlyphBitmaps.
This will come in handy in a follow-on Cl where it is desirable for
the CFX_GlyphBitmaps to know the fully-formed size of its underlying
CFX_DIBitmap at creation time.

-- rename locals to avoid confusions.

Change-Id: Ic4a3726c484aab78cfa60ac4b261c41f32c73841
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/143930
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
2026-02-27 10:24:59 -08:00

33 lines
900 B
C++

// Copyright 2019 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
#ifndef CORE_FXGE_CFX_GLYPHBITMAP_H_
#define CORE_FXGE_CFX_GLYPHBITMAP_H_
#include "core/fxcrt/retain_ptr.h"
class CFX_DIBitmap;
class CFX_GlyphBitmap {
public:
CFX_GlyphBitmap(int left, int top, RetainPtr<CFX_DIBitmap> bitmap);
CFX_GlyphBitmap(const CFX_GlyphBitmap&) = delete;
CFX_GlyphBitmap& operator=(const CFX_GlyphBitmap&) = delete;
~CFX_GlyphBitmap();
RetainPtr<CFX_DIBitmap> GetWritableBitmap();
RetainPtr<const CFX_DIBitmap> GetBitmap() const;
int left() const { return left_; }
int top() const { return top_; }
private:
const int left_;
const int top_;
const RetainPtr<CFX_DIBitmap> bitmap_;
};
#endif // CORE_FXGE_CFX_GLYPHBITMAP_H_