<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi all: I'm doing some refactoring in mapdraw.c/msDrawShape() for RFC 77 and see code like<br>
this frequently:<br>
<br>
&nbsp;if(map-&gt;scaledenom &gt; 0) {<br>
&nbsp;&nbsp; if((curStyle-&gt;maxscaledenom != -1) &amp;&amp; (map-&gt;scaledenom &gt;= curStyle-&gt;maxscaledenom))<br>
&nbsp;&nbsp;&nbsp;&nbsp; continue;<br>
&nbsp;&nbsp; if((curStyle-&gt;minscaledenom != -1) &amp;&amp; (map-&gt;scaledenom &lt; curStyle-&gt;minscaledenom))<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; continue;<br>
&nbsp;}<br>
<br>
Seems ripe for a utility function (e.g. msScaleInBounds() or a macro). I did a quick scan of the<br>
headers and didn't find anything similar but thought I check before adding. Anyone put something<br>
like this in place already? What's better a function or a macro? Assuming a macro I'm not sure
<br>
what a macro would look like- ideas welcome.<br>
<br>
Steve<br>
<br>
</div>
</body>
</html>