Fixed miter limit handling. Added local.def

This commit is contained in:
Carl Worth 2003-01-24 13:52:01 +00:00
parent cdae3ba615
commit 214662761e
6 changed files with 74 additions and 8 deletions

View file

@ -1,3 +1,12 @@
2003-01-24 Carl Worth <cworth@east.isi.edu>
* xrpolygon.c (_XrPolygonAddEdge): Fixed to handle multiple
sub-polygons.
* xrstroker.c (_XrStrokerJoin): Fixed handling of miter limit.
* local.def: Added local.def for building outside the xc tree.
2002-12-03 Carl Worth <cworth@isi.edu>
* xrstroker.c (_XrStrokerJoin):

View file

@ -1,7 +1,8 @@
XCOMM $XFree86: $
#ifndef NormalLibXr
#define NormalLibXr YES
#ifdef UseInstalled
/* building outside the tree, use private defines */
#include "local.def"
#endif
#define DoNormalLib NormalLibXr

7
README
View file

@ -10,8 +10,11 @@ Porter/Duff compositing algebra as found in the X Render Extension.
Dependencies
------------
Xr requires the Xc library. The Xc library supports basic compositing
and should work with or without the X Render extension.
Xr currently requires the following supporting libraries:
Xc
Xft
fontconfig
Usage
-----

53
local.def Normal file
View file

@ -0,0 +1,53 @@
#ifndef SharedLibXr
#define SharedLibXr HasSharedLibraries
#endif
#ifndef NormalLibXr
#define NormalLibXr (!SharedLibXr | ForceNormalLib)
#endif
#ifndef DebugLibXr
#define DebugLibXr NO
#endif
#ifndef ProfileLibXr
#define ProfileLibXr NO
#endif
#ifndef XrClientDepLibs
#define XrClientDepLibs $(DEPXCLIB) $(DEPXFTLIB) FontconfigClientDepLibs
#endif
#ifndef XrClientLibs
#define XrClientLibs $(XCLIB) $(XFTLIB) FontconfigClientLibs
#endif
XRINCLUDES=$(XCINCLUDES) $(XFTINCLUDES) $(FONTCONFIGINCLUDES)
#if SharedLibXr
#ifndef SharedXrRev
#define SharedXrRev 1.1
#endif
SharedLibReferences(XR,Xr,$(XRLIBSRC),SOXRREV,SharedXrRev)
#else
ProjectUnsharedLibReferences(XR,Xr,$(XRLIBSRC),XBuildLibDir)
#endif
#undef LinkBuildLibrary
#define LinkBuildLibrary(lib) MakeDir($(BUILDLIBDIR)) @@\
RemoveFile($(BUILDLIBDIR)/lib) @@\
cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .
#undef _LinkBuildLibrary
#define _LinkBuildLibrary(lib) LinkBuildLibrary(lib)
#undef LinkBuildLibraryMaybe
#define LinkBuildLibraryMaybe(lib,doit) MakeDir($(BUILDLIBDIR)) @@\
@if doit; then (set -x; \ @@\
RemoveFile($(BUILDLIBDIR)/lib); \ @@\
cd $(BUILDLIBDIR) && $(LN) $(BUILDLIBTOP)/$(CURRENT_DIR)/lib .); fi
#ifdef LdPreLibs
# undef LdPreLibs
#endif
#define LdPreLibs -L$(BUILDLIBDIR) LdPreLib XLdPreLibs
LDPRELIBS=LdPreLibs

View file

@ -138,8 +138,8 @@ _XrStrokerJoin(XrStroker *stroker, XrStrokeFace *in, XrStrokeFace *out)
case XrLineJoinRound: {
}
case XrLineJoinMiter: {
XDouble c = in->vector.x * out->vector.x + in->vector.y * out->vector.y;
double ml = gstate->miter_limit;
XDouble c = (-in->vector.x * out->vector.x)+(-in->vector.y * out->vector.y);
XDouble ml = gstate->miter_limit;
if (2 <= ml * ml * (1 - c)) {
XDouble x1, y1, x2, y2;
XDouble mx, my;

View file

@ -138,8 +138,8 @@ _XrStrokerJoin(XrStroker *stroker, XrStrokeFace *in, XrStrokeFace *out)
case XrLineJoinRound: {
}
case XrLineJoinMiter: {
XDouble c = in->vector.x * out->vector.x + in->vector.y * out->vector.y;
double ml = gstate->miter_limit;
XDouble c = (-in->vector.x * out->vector.x)+(-in->vector.y * out->vector.y);
XDouble ml = gstate->miter_limit;
if (2 <= ml * ml * (1 - c)) {
XDouble x1, y1, x2, y2;
XDouble mx, my;