Files
Upsilon/apps/picview/pic_view.cpp
Romain Goyet afebacdb63 PicView uses a faster rect fill
Change-Id: I08fdff5b85fa7687a37556ca1d88a51cf338ab12
2016-08-08 12:01:09 +02:00

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);
}