1
0
mirror of https://gitlab.gnome.org/GNOME/nautilus synced 2024-07-04 17:30:47 +00:00

Added appropriate copyright notices.

This commit is contained in:
Raph Levien 2000-04-14 06:40:27 +00:00
parent a487908561
commit 461be19b5c
12 changed files with 283 additions and 180 deletions

View File

@ -1,3 +1,23 @@
2000-04-14 Raph Levien <raph@gimp.org>
* librsvg/art_rgba.c:
librsvg/art_rgba.h:
librsvg/art_rgba_svp.c:
librsvg/art_rgba_svp.h: Added GPL copyright notice making clear
that these files are part of libart_gpl. Also made .h files
C++ friendly.
* librsvg/rsvg-bpath-util.c:
librsvg/rsvg-bpath-util.h:
librsvg/rsvg-path.c:
librsvg/rsvg-path.h:
librsvg/rsvg.c:
librsvg/rsvg.h: Added GPL copyright notice assigning copyright
to Eazel. Also made .h files C++ friendly.
* librsvg/rsvg-bpath.c: Removed this file, it's subsumed by
rsvg-bpath-util.c.
2000-04-13 Ramiro Estrugo <ramiro@eazel.com>
* idl/nautilus.idl,

View File

@ -1,3 +1,25 @@
/*
* art_rgba.c: Functions for manipulating RGBA pixel data.
*
* Libart_GPL - library of basic graphic primitives
* Copyright (C) 2000 Raph Levien
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#include <libart_lgpl/art_misc.h>
#include "art_rgba.h"

View File

@ -1,6 +1,32 @@
/*
* art_rgba.h: Functions for manipulating RGBA pixel data.
*
* Libart_GPL - library of basic graphic primitives
* Copyright (C) 2000 Raph Levien
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef __ART_RGBA_H__
#define __ART_RGBA_H__
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
void
art_rgba_rgba_composite (art_u8 *dst, const art_u8 *src, int n);
@ -10,4 +36,8 @@ art_rgba_fill_run (art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int n);
void
art_rgba_run_alpha (art_u8 *buf, art_u8 r, art_u8 g, art_u8 b, int alpha, int n);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif

View File

@ -1,3 +1,25 @@
/*
* art_rgba_svp.c: Render a sorted vector path over an RGBA buffer.
*
* Libart_GPL - library of basic graphic primitives
* Copyright (C) 2000 Raph Levien
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#include <libart_lgpl/art_misc.h>
#include <libart_lgpl/art_svp.h>
#include <libart_lgpl/art_svp_render_aa.h>

View File

@ -1,8 +1,31 @@
/*
* art_rgba_svp.h: Render a sorted vector path over an RGBA buffer.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
#ifndef __ART_RGBA_SVP_H__
#define __ART_RGBA_SVP_H__
#include <libart_lgpl/art_alphagamma.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
void
art_rgba_svp_alpha (const ArtSVP *svp,
int x0, int y0, int x1, int y1,
@ -10,4 +33,8 @@ art_rgba_svp_alpha (const ArtSVP *svp,
art_u8 *buf, int rowstride,
ArtAlphaGamma *alphagamma);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif

View File

@ -1,3 +1,26 @@
/*
rsvg-bpath-util.c: Data structure and convenience functions for creating bezier paths.
Copyright (C) 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Raph Levien <raph@artofcode.com>
*/
#include <glib.h>
#include <math.h>
#include "rsvg-bpath-util.h"

View File

@ -1,8 +1,35 @@
/*
rsvg-bpath-util.h: Data structure and convenience functions for creating bezier paths.
Copyright (C) 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Raph Levien <raph@artofcode.com>
*/
#ifndef RSVG_BPATH_UTIL_H
#define RSVG_BPATH_UTIL_H
#include <libart_lgpl/art_bpath.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
typedef struct _RsvgBpathDef RsvgBpathDef;
struct _RsvgBpathDef {
@ -33,5 +60,9 @@ void rsvg_bpath_def_closepath (RsvgBpathDef *bpd);
void rsvg_bpath_def_art_finish (RsvgBpathDef *bpd);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif

View File

@ -1,168 +0,0 @@
#include <glib.h>
#include <math.h>
#include "rsvg-bpath-util.h"
GnomeCanvasBpathDef *
gnome_canvas_bpath_def_new (void)
{
GnomeCanvasBpathDef *bpd;
bpd = g_new (GnomeCanvasBpathDef, 1);
bpd->n_bpath = 0;
bpd->n_bpath_max = 16;
bpd->moveto_idx = -1;
bpd->bpath = g_new (ArtBpath, bpd->n_bpath_max);
bpd->ref_count = 1;
return bpd;
}
GnomeCanvasBpathDef *
gnome_canvas_bpath_def_new_from (ArtBpath *path)
{
GnomeCanvasBpathDef *bpd;
int n, i;
g_return_val_if_fail (path != NULL, NULL);
for (i = 0; path [i].code != ART_END; i++)
;
if (i <= 0)
return gnome_canvas_bpath_def_new ();
bpd = g_new (GnomeCanvasBpathDef, 1);
bpd->n_bpath = i;
bpd->n_bpath_max = i;
bpd->moveto_idx = -1;
bpd->ref_count = 1;
bpd->bpath = g_new (ArtBpath, i);
memcpy (bpd->bpath, path, i * sizeof (ArtBpath));
return bpd;
}
GnomeCanvasBpathDef *
gnome_canvas_bpath_def_ref (GnomeCanvasBpathDef *bpd)
{
g_return_val_if_fail (bpd != NULL, NULL);
bpd->ref_count += 1;
return bpd;
}
void
gnome_canvas_bpath_def_free (GnomeCanvasBpathDef *bpd)
{
g_return_if_fail (bpd != NULL);
bpd->ref_count -= 1;
if (bpd->ref_count == 0) {
g_free (bpd->bpath);
g_free (bpd);
}
}
void
gnome_canvas_bpath_def_moveto (GnomeCanvasBpathDef *bpd, double x, double y)
{
ArtBpath *bpath;
int n_bpath;
g_return_if_fail (bpd != NULL);
n_bpath = bpd->n_bpath++;
if (n_bpath == bpd->n_bpath_max)
bpd->bpath = g_realloc (bpd->bpath,
(bpd->n_bpath_max <<= 1) * sizeof (ArtBpath));
bpath = bpd->bpath;
bpath[n_bpath].code = ART_MOVETO_OPEN;
bpath[n_bpath].x3 = x;
bpath[n_bpath].y3 = y;
bpd->moveto_idx = n_bpath;
}
void
gnome_canvas_bpath_def_lineto (GnomeCanvasBpathDef *bpd, double x, double y)
{
ArtBpath *bpath;
int n_bpath;
g_return_if_fail (bpd != NULL);
g_return_if_fail (bpd->moveto_idx >= 0);
n_bpath = bpd->n_bpath++;
if (n_bpath == bpd->n_bpath_max)
bpd->bpath = g_realloc (bpd->bpath,
(bpd->n_bpath_max <<= 1) * sizeof (ArtBpath));
bpath = bpd->bpath;
bpath[n_bpath].code = ART_LINETO;
bpath[n_bpath].x3 = x;
bpath[n_bpath].y3 = y;
}
void
gnome_canvas_bpath_def_curveto (GnomeCanvasBpathDef *bpd, double x1, double y1, double x2, double y2, double x3, double y3)
{
ArtBpath *bpath;
int n_bpath;
g_return_if_fail (bpd != NULL);
g_return_if_fail (bpd->moveto_idx >= 0);
n_bpath = bpd->n_bpath++;
if (n_bpath == bpd->n_bpath_max)
bpd->bpath = g_realloc (bpd->bpath,
(bpd->n_bpath_max <<= 1) * sizeof (ArtBpath));
bpath = bpd->bpath;
bpath[n_bpath].code = ART_CURVETO;
bpath[n_bpath].x1 = x1;
bpath[n_bpath].y1 = y1;
bpath[n_bpath].x2 = x2;
bpath[n_bpath].y2 = y2;
bpath[n_bpath].x3 = x3;
bpath[n_bpath].y3 = y3;
}
void
gnome_canvas_bpath_def_closepath (GnomeCanvasBpathDef *bpd)
{
ArtBpath *bpath;
int n_bpath;
g_return_if_fail (bpd != NULL);
g_return_if_fail (bpd->moveto_idx >= 0);
g_return_if_fail (bpd->n_bpath > 0);
bpath = bpd->bpath;
n_bpath = bpd->n_bpath;
/* Add closing vector if we need it. */
if (bpath[n_bpath - 1].x3 != bpath[bpd->moveto_idx].x3 ||
bpath[n_bpath - 1].y3 != bpath[bpd->moveto_idx].y3) {
gnome_canvas_bpath_def_lineto (bpd, bpath[bpd->moveto_idx].x3,
bpath[bpd->moveto_idx].y3);
bpath = bpd->bpath;
}
bpath[bpd->moveto_idx].code = ART_MOVETO;
bpd->moveto_idx = -1;
}
void
gnome_canvas_bpath_def_art_finish (GnomeCanvasBpathDef *bpd)
{
int n_bpath;
g_return_if_fail (bpd != NULL);
n_bpath = bpd->n_bpath++;
if (n_bpath == bpd->n_bpath_max)
bpd->bpath = g_realloc (bpd->bpath,
(bpd->n_bpath_max <<= 1) * sizeof (ArtBpath));
bpd->bpath [n_bpath].code = ART_END;
}

View File

@ -1,23 +1,24 @@
/* rsvg-path.c
Copyright (C) 1999,2000 Raph Levien <raph@acm.org>
Gill is free software; you can redistribute it and/or
/*
rsvg-path.c: Parse SVG path element data into bezier path.
Copyright (C) 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
Gill is distributed in the hope that it will be useful,
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with Gill; see the file COPYING. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Raph Levien <raph@acm.org>
Author: Raph Levien <raph@artofcode.com>
*/
/* This is adapted from svg-path in Gill. */

View File

@ -1,2 +1,38 @@
/*
rsvg-path.h: Parse SVG path element data into bezier path.
Copyright (C) 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Raph Levien <raph@artofcode.com>
*/
#ifndef RSVG_PATH_H
#define RSVG_PATH_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
RsvgBpathDef *
rsvg_parse_path (const char *path_str);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif

View File

@ -1,3 +1,26 @@
/*
rsvg.c: SAX-based renderer for SVG files into a GdkPixbuf.
Copyright (C) 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Raph Levien <raph@artofcode.com>
*/
#include <stdio.h>
#include <string.h>
#include <math.h>

View File

@ -1,2 +1,38 @@
/*
rsvg.h: SAX-based renderer for SVG files into a GdkPixbuf.
Copyright (C) 2000 Eazel, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program; if not, write to the
Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
Author: Raph Levien <raph@artofcode.com>
*/
#ifndef RSVG_H
#define RSVG_H
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
GdkPixbuf *
rsvg_render_file (FILE *f, double zoom);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif