summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2003-01-24 13:52:01 +0000
committerCarl Worth <cworth@cworth.org>2003-01-24 13:52:01 +0000
commit214662761e7ea372073f4a1a496c3859f893d6ac (patch)
tree48ebf687d3e62d5379e1b8e148466ae61f14a81a
parentcdae3ba6155a7c883e52f1617edd9f6ab61df830 (diff)
Fixed miter limit handling. Added local.def
-rw-r--r--ChangeLog9
-rw-r--r--Imakefile5
-rw-r--r--README7
-rw-r--r--local.def53
-rw-r--r--src/xrstroker.c4
-rw-r--r--xrstroker.c4
6 files changed, 74 insertions, 8 deletions
diff --git a/ChangeLog b/ChangeLog
index 5d3245b89..05bae7a56 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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):
diff --git a/Imakefile b/Imakefile
index ba58ddde5..38887ee6d 100644
--- a/Imakefile
+++ b/Imakefile
@@ -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
diff --git a/README b/README
index 874fdc6be..2296a9130 100644
--- a/README
+++ b/README
@@ -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
-----
diff --git a/local.def b/local.def
new file mode 100644
index 000000000..93d19aaf1
--- /dev/null
+++ b/local.def
@@ -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
diff --git a/src/xrstroker.c b/src/xrstroker.c
index 28cdaa685..eb86daa9a 100644
--- a/src/xrstroker.c
+++ b/src/xrstroker.c
@@ -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;
diff --git a/xrstroker.c b/xrstroker.c
index 28cdaa685..eb86daa9a 100644
--- a/xrstroker.c
+++ b/xrstroker.c
@@ -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;