private void WritePenWidth(IPenWidth symbol) { if (symbol == null) { return; } _sw.WriteLine(@"<CssParameter name=""stroke-width"">" + symbol.PenWidth.ToString(_nhi) + "</CssParameter>"); }
static public float PenWidth(float penWidth, IPenWidth symbol, Carto.IDisplay display) { float dpiFactor = display == null || display.dpi == 96.0f ? 1f : (float)(display.dpi / 96.0); if (symbol.MinPenWidth > 0f && penWidth < symbol.MinPenWidth * dpiFactor) { return(symbol.MinPenWidth * dpiFactor); } if (symbol.MaxPenWidth > 0 && penWidth > symbol.MaxPenWidth * dpiFactor) { return(symbol.MaxPenWidth * dpiFactor); } return(penWidth); }