mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
15 lines
376 B
C++
15 lines
376 B
C++
#include "pic_view.h"
|
|
#include <assert.h>
|
|
|
|
PicView::PicView() :
|
|
ChildlessView() {
|
|
}
|
|
|
|
#include "image.c"
|
|
|
|
void PicView::drawRect(KDContext * ctx, KDRect rect) const {
|
|
KDColor * pixels = (KDColor *)apps_picview_image_raw;
|
|
assert(apps_picview_image_raw_len == bounds().width() * bounds().height() * sizeof(KDColor));
|
|
ctx->fillRectWithPixels(bounds(), pixels, nullptr);
|
|
}
|