Commit f6cae9e3 authored by Raph Levien's avatar Raph Levien

A number of fixes needed to get the bezier path item to work (that's in gill).

parent 10523e26
Sun Jun 13 01:23:14 1999 Raph Levien <raph@gimp.org>
* art_svp_wind.c (art_svp_rewind_uncrossed): Change to winding
rule logic so that it correctly handles the case where the
leftmost segment is negative.
* Makefile.am (libart_lgplinc_HEADERS): made art_svp_wind.h
a public headerfile. This is needed for the bpath canvas item.
I'm not sure this is the correct way to do it, but it will do
for now.
* art_vpath_bpath.h:
* art_vpath_bpath.c (art_bez_path_to_vec): Added const to arg.
* art_vpath_bpath.h: Embarrassing typo.
* art_bpath.h: Minor tweaks to the #include paths. It is now
consistent with the other header files.
Wed Jun 9 20:24:45 1999 Raph Levien <raph@gimp.org>
* art_svp_vpath_stroke.c: Added all remaining line join and cap
......
......@@ -33,7 +33,6 @@ libart_lgpl_la_SOURCES = \
art_svp_vpath.c \
art_svp_vpath_stroke.c \
art_svp_wind.c \
art_svp_wind.h \
art_uta.c \
art_uta_ops.c \
art_uta_rect.c \
......@@ -70,6 +69,7 @@ libart_lgplinc_HEADERS = \
art_svp_render_aa.h \
art_svp_vpath.h \
art_svp_vpath_stroke.h \
art_svp_wind.h \
art_uta.h \
art_uta_ops.h \
art_uta_rect.h \
......
......@@ -20,8 +20,8 @@
#ifndef __ART_BPATH_H__
#define __ART_BPATH_H__
#include <art_point.h>
#include <art_pathcode.h>
#include <libart_lgpl/art_point.h>
#include <libart_lgpl/art_pathcode.h>
/* Basic data structures and constructors for bezier paths */
......
......@@ -1365,16 +1365,24 @@ art_svp_rewind_uncrossed (ArtSVP *vp, ArtWindRule rule)
/* Determine winding number for this segment */
if (i == 0)
left_wind = 0;
else if (vp->segs[active_segs[i - 1]].dir)
left_wind = winding[active_segs[i - 1]];
{
if (vp->segs[seg_idx].dir)
wind = 1;
else
wind = -1;
}
else
left_wind = winding[active_segs[i - 1]] - 1;
{
if (vp->segs[active_segs[i - 1]].dir)
left_wind = winding[active_segs[i - 1]];
else
left_wind = winding[active_segs[i - 1]] - 1;
if (vp->segs[seg_idx].dir)
wind = left_wind + 1;
else
wind = left_wind;
if (vp->segs[seg_idx].dir)
wind = left_wind + 1;
else
wind = left_wind;
}
winding[seg_idx] = wind;
......
......@@ -92,7 +92,7 @@ art_bezier_to_vec (double x0, double y0,
/* We could scan first and allocate to fit, but we don't. */
ArtVpath *
art_bez_path_to_vec (ArtBpath *bez, double flatness)
art_bez_path_to_vec (const ArtBpath *bez, double flatness)
{
ArtVpath *vec;
int vec_n, vec_n_max;
......
......@@ -31,9 +31,7 @@ ArtPoint *art_bezier_to_vec (double x0, double y0,
ArtPoint *p,
int level);
ArtVpath *art_bez_path_to_vec (ArtBpath *bez, double flatness);
};
ArtVpath *art_bez_path_to_vec (const ArtBpath *bez, double flatness);
#ifdef __cplusplus
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment