mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
PicView uses a faster rect fill
Change-Id: I08fdff5b85fa7687a37556ca1d88a51cf338ab12
This commit is contained in:
@@ -9,12 +9,6 @@ PicView::PicView() :
|
||||
|
||||
void PicView::drawRect(KDContext * ctx, KDRect rect) const {
|
||||
KDColor * pixels = (KDColor *)apps_picview_image_raw;
|
||||
KDCoordinate width = bounds().width();
|
||||
KDCoordinate height = bounds().height();
|
||||
assert(apps_picview_image_raw_len == width*height*sizeof(KDColor));
|
||||
for (int j=0; j<height; j++) {
|
||||
for (int i=0; i<width; i++) {
|
||||
ctx->setPixel(KDPoint(i,j), pixels[j*width+i]);
|
||||
}
|
||||
}
|
||||
assert(apps_picview_image_raw_len == bounds().width() * bounds().height() * sizeof(KDColor));
|
||||
ctx->fillRectWithPixels(bounds(), pixels, nullptr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user