slackbuilds_ponce/graphics/yvonne/fixgarbage.diff
B. Watson ecb464279e
graphics/yvonne: Added (viewer for Atari 8-bit image formats)
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2022-12-31 09:14:41 +07:00

18 lines
650 B
Diff

diff -Naur yvonne-1.0.orig/widget.cpp yvonne-1.0/widget.cpp
--- yvonne-1.0.orig/widget.cpp 2006-12-28 16:37:54.000000000 -0500
+++ yvonne-1.0/widget.cpp 2022-12-27 22:50:09.965687828 -0500
@@ -182,6 +182,14 @@
nWidth=m_pImage->getWidth();
nHeight=m_pImage->getHeight();
pDisplayImage=new QImage(IMAGE_WIDTH_MAX, IMAGE_HEIGHT_MAX, QImage::Format_RGB32);
+ QRgb black = qRgb(0, 0, 0);
+ for(unsigned int y=0;y<IMAGE_HEIGHT_MAX;y++)
+ {
+ for(unsigned int x=0;x<IMAGE_WIDTH_MAX;x++)
+ {
+ pDisplayImage->setPixel(x, y, black);
+ }
+ }
nSeekX=(IMAGE_WIDTH_MAX-nWidth)>>1;
nSeekY=(IMAGE_HEIGHT_MAX-nHeight)>>1;
for(int y=0;y<nHeight;y++)