mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-24 00:45:52 +00:00
FIx a bug with the -tile option.
PR: ports/28245 Submitted by: Rémi Guyomarch <rguyom@pobox.com>
This commit is contained in:
parent
a95b0a6c19
commit
54d9746182
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=44337
@ -7,6 +7,7 @@
|
||||
|
||||
VERSION= 4.1
|
||||
REVISION= 6
|
||||
PORTREVISION= 1
|
||||
|
||||
PORTNAME= xloadimage
|
||||
PORTVERSION= ${VERSION}.${REVISION}
|
||||
|
31
x11/xloadimage/files/patch-tile
Normal file
31
x11/xloadimage/files/patch-tile
Normal file
@ -0,0 +1,31 @@
|
||||
--- merge.c~ Thu Oct 21 22:28:39 1993
|
||||
+++ merge.c Mon Jun 18 02:23:58 2001
|
||||
@@ -244,6 +244,7 @@
|
||||
int x, y;
|
||||
unsigned int width, height, verbose;
|
||||
{ Image *base, *tmp;
|
||||
+ int nx, ny;
|
||||
|
||||
if (verbose) {
|
||||
printf(" Tiling...");
|
||||
@@ -259,16 +260,14 @@
|
||||
else
|
||||
base = newTrueImage(width, height);
|
||||
|
||||
- while (x < base->width) {
|
||||
- while(y < base->height) {
|
||||
- tmp = merge(base, image, x, y, 0);
|
||||
+ for (nx = x; nx < base->width; nx += image->width) {
|
||||
+ for(ny = y; ny < base->height; ny += image->height) {
|
||||
+ tmp = merge(base, image, nx, ny, 0);
|
||||
if (tmp != base) {
|
||||
freeImage(base);
|
||||
base = tmp;
|
||||
}
|
||||
- y += image->width;
|
||||
}
|
||||
- x += image->width;
|
||||
}
|
||||
printf("done.\n");
|
||||
return(base);
|
||||
|
Loading…
Reference in New Issue
Block a user