From 6899f8f36506f05179f7688224756f9afe9df26e Mon Sep 17 00:00:00 2001 From: Michael J Gruber Date: Tue, 22 Jun 2010 10:17:05 +0200 Subject: [PATCH] manual,graph.style.surface: Fix a striking typo Lightning is what strikes before thunder roars, lighting is the shading created by light sources. Signed-off-by: Michael J Gruber --- manual/graph.tex | 4 ++-- pyx/graph/style.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/manual/graph.tex b/manual/graph.tex index 54f903fb..897e4bfc 100644 --- a/manual/graph.tex +++ b/manual/graph.tex @@ -1052,10 +1052,10 @@ definition is: maximal values, but larger bounds could be set). If no \var{colorname} column exists, the surface style falls back - to a lightning coloring taking into account the angle between the + to a lighting coloring taking into account the angle between the view ray and the triangle and the distance between viewer and triangle. The precise conversion is defined in the - \method{lightning} method. + \method{lighting} method. If a \var{gridcolor} is set, the rectangular grid is marked by small stripes of the relative (compared to each rectangle) size of diff --git a/pyx/graph/style.py b/pyx/graph/style.py index 562b3e72..b4842976 100644 --- a/pyx/graph/style.py +++ b/pyx/graph/style.py @@ -1688,7 +1688,7 @@ class surface(_style): def midcolor(self, c1, c2, c3, c4): return 0.25*(c1+c2+c3+c4) - def lightning(self, angle, zindex): + def lighting(self, angle, zindex): if angle < 0 and self.backcolor is not None: return self.backcolor return self.gradient.getcolor(0.7-0.4*abs(angle)+0.1*zindex) @@ -1822,10 +1822,10 @@ class surface(_style): c4d = c3d = c5d = self.backcolor else: zindex = graph.vzindex(*v5) - c1a = c2a = c5a = self.lightning(sign*graph.vangle(*(v1+v2+v5)), zindex) - c3b = c1b = c5b = self.lightning(sign*graph.vangle(*(v3+v1+v5)), zindex) - c2c = c4c = c5c = self.lightning(sign*graph.vangle(*(v2+v4+v5)), zindex) - c4d = c3d = c5d = self.lightning(sign*graph.vangle(*(v4+v3+v5)), zindex) + c1a = c2a = c5a = self.lighting(sign*graph.vangle(*(v1+v2+v5)), zindex) + c3b = c1b = c5b = self.lighting(sign*graph.vangle(*(v3+v1+v5)), zindex) + c2c = c4c = c5c = self.lighting(sign*graph.vangle(*(v2+v4+v5)), zindex) + c4d = c3d = c5d = self.lighting(sign*graph.vangle(*(v4+v3+v5)), zindex) for zindex, i in sortElements: if i == 0: elements.append(mesh.element((mesh.node_pt((x1_pt, y1_pt), c1a), -- 2.11.4.GIT