CDC Badge OS
Firmware for the CDC Badge v1.0 hardware security key
Loading...
Searching...
No Matches
ImageView.cpp File Reference
#include "cdc_views/ImageView.h"
#include "cdc_views/KeyCodes.h"
#include "cdc_views/LayoutConstants.h"
#include "cdc_views/RenderHelpers.h"
#include "cdc_ui/I18n.h"
#include "cdc_ui/ViewStack.h"
#include "cdc_hal/IDisplay.h"
#include "cdc_log.h"
#include "cdc_image/Dither.h"
#include "cdc_image/ImageDecoder.h"
#include <goodisplay/gdey029T94.h>
#include <cstring>

Go to the source code of this file.

Namespaces

namespace  cdc
namespace  cdc::ui
 Centralized key-code constants for cdc_views.

Functions

ImageViewcdc::ui::showImage (const char *title, const uint8_t *data, size_t len)
 Decodes and shows an image on the view stack.

Variables

static const char * TAG = "ImageView"
static ImageView cdc::ui::s_sharedImageView
constexpr int FOOTER_HEIGHT
 Footer bar height in pixels (used by drawFooterBar).

Variable Documentation

◆ FOOTER_HEIGHT

Footer bar height in pixels (used by drawFooterBar).

Definition at line 21 of file LayoutConstants.h.

Referenced by cdc::ui::ImageView::init(), cdc::ui::ImageView::render(), cdc::ui::InfoView::render(), and cdc::ui::MarkdownView::render().

◆ TAG

const char* TAG = "ImageView"
static

ImageView Implementation

Decodes a PNG/JPEG to two 1-bit bitmaps (fit + native) and renders them on the e-paper with a pan mode for actual size.

Definition at line 25 of file ImageView.cpp.