summaryrefslogtreecommitdiff
path: root/graphics/asymptote/base/palette.asy
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/base/palette.asy')
-rw-r--r--graphics/asymptote/base/palette.asy10
1 files changed, 8 insertions, 2 deletions
diff --git a/graphics/asymptote/base/palette.asy b/graphics/asymptote/base/palette.asy
index e3d6218312..9923e5b3aa 100644
--- a/graphics/asymptote/base/palette.asy
+++ b/graphics/asymptote/base/palette.asy
@@ -190,8 +190,8 @@ bounds image(picture pic=currentpicture, pair[] z, real[] f,
real rmax=pic.scale.z.T(bounds.max);
palette=adjust(pic,m,M,rmin,rmax,palette);
- rmin=max(rmin,m);
- rmax=min(rmax,M);
+ rmin=max(rmin,pic.scale.z.T(m));
+ rmax=min(rmax,pic.scale.z.T(M));
// Crop data to allowed range and scale
if(range != Full || pic.scale.z.scale.T != identity ||
@@ -201,6 +201,12 @@ bounds image(picture pic=currentpicture, pair[] z, real[] f,
real M=bounds.max;
f=map(new real(real x) {return T(min(max(x,m),M));},f);
}
+ if(pic.scale.x.scale.T != identity || pic.scale.x.postscale.T != identity ||
+ pic.scale.y.scale.T != identity || pic.scale.y.postscale.T != identity) {
+ scalefcn Tx=pic.scale.x.T;
+ scalefcn Ty=pic.scale.y.T;
+ z=map(new pair(pair z) {return (Tx(z.x),Ty(z.y));},z);
+ }
int[] edges={0,0,1};
int N=palette.length-1;