Sfoglia il codice sorgente

* Do not prefix stock image names with "pipi:", it's redundant.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2757 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 anni fa
parent
commit
6a9475464c
2 ha cambiato i file con 9 aggiunte e 8 eliminazioni
  1. +3
    -2
      pipi/codec.c
  2. +6
    -6
      pipi/stock.c

+ 3
- 2
pipi/codec.c Vedi File

@@ -28,8 +28,9 @@

pipi_image_t *pipi_load(char const *name)
{
if(!strncmp(name, "pipi:", 5))
return pipi_load_stock(name + 5);
if(!strncmp(name, "random:", 7) ||
!strncmp(name, "bayer:", 6))
return pipi_load_stock(name);

#if USE_IMLIB2
return pipi_load_imlib2(name);


+ 6
- 6
pipi/stock.c Vedi File

@@ -33,12 +33,12 @@ pipi_image_t *pipi_load_stock(char const *name)
float *data;

/* Generate a Bayer dithering pattern. */
if(!strncmp(name, "bayer", 5))
if(!strncmp(name, "bayer:", 6))
{
int i, j, w, h, n;

w = atoi(name + 5);
name = strchr(name + 5, 'x');
w = atoi(name + 6);
name = strchr(name + 6, 'x');
if(!name)
return NULL;
h = atoi(name + 1);
@@ -74,13 +74,13 @@ pipi_image_t *pipi_load_stock(char const *name)
}

/* Generate a completely random image. */
if(!strncmp(name, "random", 6))
if(!strncmp(name, "random:", 7))
{
unsigned int ctx = 1;
int x, y, t, w, h;

w = atoi(name + 6);
name = strchr(name + 6, 'x');
w = atoi(name + 7);
name = strchr(name + 7, 'x');
if(!name)
return NULL;
h = atoi(name + 1);


Caricamento…
Annulla
Salva