//////////////////////////////////////////////////////////////////////////// //--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 13JUN2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * draw a path. * @param path */ public void DrawPath(GraphicsPathFP path) { if (_lineStyle.DashArray != null) { var newlineStyle = new PenFP(_lineStyle.Brush, _lineStyle.Width, PenFP.LINECAP_BUTT, PenFP.LINECAP_BUTT, PenFP.LINEJOIN_MITER) { DashArray = _lineStyle.DashArray }; var dasher = new GraphicsPathDasherFP(path, newlineStyle.DashArray, 0); var newPath = dasher.GetDashedGraphicsPath(); _renderer.DrawPath(newPath.CalcOutline(newlineStyle), _matrix, _lineStyle.Brush, GraphicsPathRendererFP.MODE_ZERO); } else { _renderer.DrawPath(path.CalcOutline(_lineStyle), _matrix, _lineStyle.Brush, GraphicsPathRendererFP.MODE_ZERO); } }
//////////////////////////////////////////////////////////////////////////// //--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 13JUN2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * draw a path. * @param path */ public void DrawPath(GraphicsPathFP path) { if (_lineStyle.DashArray != null) { var newlineStyle = new PenFP(_lineStyle.Brush, _lineStyle.Width, PenFP.LINECAP_BUTT, PenFP.LINECAP_BUTT, PenFP.LINEJOIN_MITER) {DashArray = _lineStyle.DashArray}; var dasher = new GraphicsPathDasherFP(path, newlineStyle.DashArray, 0); var newPath = dasher.GetDashedGraphicsPath(); _renderer.DrawPath(newPath.CalcOutline(newlineStyle), _matrix, _lineStyle.Brush, GraphicsPathRendererFP.MODE_ZERO); } else { _renderer.DrawPath(path.CalcOutline(_lineStyle), _matrix, _lineStyle.Brush, GraphicsPathRendererFP.MODE_ZERO); } }